Run commands as the appropriate user

Commands will now be run as the same user that added them via edit.py. I also set a few environment variables that are generally expected to be set. PATH will get set by the shell, so I don't have to set it explicitly.