#7 ask before quitting when there are dirty buffers
#7 add a test and minor refactoring
Merge issue 7: branch 'issue/fix-quit-7'