Cleanup editor exiting code.

The duplicated code in \__call\__ and run() in editor.py was bugging me, so I cleaned up a bit. Test and make sure it works for you too!

Scott