Nine packages each had their own write-temp-then-rename helper with slightly different behaviour (some synced, some did not; some created the parent directory, some did not; modes and temp-file patterns varied). They are replaced by one fsutil.WriteFileAtomic that always syncs before rename, creates the parent directory, and takes the file mode as a parameter.