Improved the file loading and saving mechanism
+ The user is now warned if there are unsaved changes
* Loading a file now clears the history (as it should do)

Signed-off-by: Mark Kamsma <mark@markkamsma.nl>