pub fn write_atomically(path: &Path, text: &str) -> Result<()>
Write a file so that nobody ever reads half of it: write beside it, then rename over it.