Displays alert if editor is dirty before unload

closes #1327
- Prevents user from accidently losing changes