Fix sys.path manipulation

Fixes #671, #673.  Supersedes #672.

base64 should be imported *after* sys.path manipulation -- not doing
this causes #671.

sys.path is fixed up at the top level (since commit dde220efe38b99020),
doing it again in copy_required_modules() breaks things -- this is #673.
This makes the try/finally to restore the old sys.path unnecessary,
which produces the gnarly diff :/