fix broken environment save/restore when a hook runs.
move "run commend with different env/cwd" code out to function in util.
new function is called esystem.
requesting all changesabort: error: Connection refused255ls: copy: No such file or directoryrequesting all changesabort: HTTP Error 404: File not found255