Adds confirmation for window closing (#49)

Fixes issue #49 but the dialog text might not be what you would prefer?