Save partial gamelist on error/interruption + code cleanup

- Will save off the current XML gamelist if there is an exception or if the user presses Ctrl+C.
- Converted tabs to spaces and line endings.

Kind of a large diff due to the whitespace cleanup but theres really only about 5 lines added for the error handling.