pub fn write_text(path: &str, text: &str) -> Result<(), String>
Writes a text file, creating folders.