Python Write Multiline String To File