Replace files atomically when relocating, take two