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.
#!/bin/shhghg -qhg helphg -q helphg add -hhg add --skjdfkshg help diffhg help statushg -q help statushg help foohg skjdfksexit 0