Added new utility for exporting to files

Working on refining the functions. This is my first Python code, so merge if it looks fine. It it doesn't, tell me the changes, will improve and push again.