Saving Text, JSON, and CSV to a File in Python