code: def pushd(path):
      
      orig_path = os.getcwd()
      os.chdir(path)
      try:
          yield
      finally:
          os.chdir(orig_path)
docs: pushd changes the actual working directory for the duration of the
      context, unlike the _cwd arg this will work with other built-ins such as
      sh.glob correctly