Fix #106 - Fix a couple issues with modified files.

- Newly-created files can now be marked as modified, so the user will be
prompted to save their changes before exiting.
- When closing the windows (e.g. with Alt+F4) the user is now prompted
to save any modified tabs - previously this only happened when closing a
single tab with Ctrl+W.