Be sure to return to the old directory if cwd is set in run_command
Cleaning up some exception blocks in TestModuleUtilsBasic