pub fn write_file(path: &Path, content: &str) -> Result<(), IoError>
Write content to a file. Creates parent dirs if needed.