Add code to make sure users don't lose their work by accident

Dear Mr. Shiffman,

My sister and I love your tutorial.  We did it with our dad (David Humphrey).  I made an owl, and my sister made a minion from Despicable Me.  However my sister lost her work.  We found a bug in your code.  When you click outside of the code editor, and press Delete or Backspace on the keyboard, it takes you back to the beginning and your work is lost.

With our dad we worked on a way to fix this bug.  Here is our change to your code.  Our code gives you the option to stay if you accidentally try to leave.  We hope that you consider our change, and other new programmers like us don't lose their work.

Thanks for making a tutorial like this for new programmers.  It was really fun and we enjoyed doing it.

Yours,

The Three Amigos (E, M, and David Humphrey)