If a build gets interrupted, e.g. by a power failure, we can be left with empty outputs, since the builder has done e.g. 'foo > "$out"', which has created the output. Change this so we write to a local file, and 'mv' it at the end.