Remember most recently opened script location.

Previously when running a script from a file you were always taken back
to your desktop directory. Now you will be taken to the location of your
most recently opened script.
Merge pull request #2575 from brotchie/master

Remember most recently opened script location.