pub fn write_atomic(path: &Path, bytes: &[u8]) -> Result<()>
Writes finished bytes to path through a temp file, so path may be the input file.
path