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.
%% no changes%% no changes%% uncompressed contents in repothis is a test%% uncompress our working dir copythis is a test%% uncompress our new working dir copythis is a test