pub fn atomic_write(target: &Path, data: &[u8]) -> Result<(), Error>
Atomic write: write to temp file then rename