Add close dialog

Using Ctl-Q now prompts a dialog for program exit.