More easily overridable reference to git executable, added ability to pass in desired working directory instead of always generating a new random one.