Copy file metadata in atomic save

Closes gh-6405
sp: dereference