Fix the space bar.
Don't crash if no EDITOR set.
Use a known version of Python.

Suggested by Edd Barrett.
Infer program name from sys.argv.

This is a subset of a patch originally from Edd Barrett.