Added signal catching support

When a user sends a ^C or SIGINT to the program, it is caught.
The user is then warned that there is unsaved data (not necesarily
true, but a check could be added) and asks to confirm if they would
like to quit.