Fix issue where working directory wasn't being set. Also removed some cruft related to setting jobEnvironment.