rose.config.dump: use temporary file to stage

If process is killed or if storage is full, the worst we'd have is a
partially written temporary file in the same file system, instead of a
partially written target file.

Close #1062.