Make run.sh handle errors a bit better

This gives run.sh a little better error handling, and uses sudo to install pip and/or virtualenv.