ensures the program quits when the user presses the exit button and the program doesn't handle CIO_KEY_QUIT. This still isn't the best way to do things.