build: Fix srcdir != builddir
build: Fix srcdir != builddir

Caught by GContinuous.  Also change the file writes to be atomic,
otherwise we're not Ctrl-c safe.

gatispaeglis/ostree,gatispaeglis/ostree,GNOME/ostree,GNOME/ostree,gatispaeglis/ostree,GNOME/ostree,GNOME/ostree,gatispaeglis/ostree,gatispaeglis/ostree,gatispaeglis/ostree,GNOME/ostree