def set_cwd(cls, cwd):
        """
        Set the cwd that is used to manipulate paths.
        """
        if not cwd:
            try:
                cwd = os.getcwdu()
            except AttributeError:
                cwd = os.getcwd()
        if isinstance(cwd, six.binary_type):
            cwd = cwd.decode(sys.getdefaultencoding())
        cls._cwd = cwd
        cls._root = cls._git_root()
Set the cwd that is used to manipulate paths.