pub fn write_config_file(path: &Path, content: &str) -> Result<()>
Write a config file, creating parent directories if needed.