fix replace_sys_path not working properly

We were changing the list we were iterating over, never a good idea.
reimplement exec/console

Note that these were run/py previously.
Don't write ourselves to lockfile