Add a new path to the list of search paths. Return False if it does
            not exist.

            :param path: The new search path. Relative paths are turned into an
                absolute and normalized form. If the path looks like a file (not
                ending in `/`), the filename is stripped off.
            :param base: Path used to absolutize relative search paths.
                Defaults to `:attr:base` which defaults to ``./``.
            :param index: Position within the list of search paths. Defaults to
                last index (appends to the list).
            :param create: Create non-existent search paths. Off by default.

            The `base` parameter makes it easy to reference files installed
            along with a python module or package::
            
                res.add_path('./resources/', __file__)

def add_path(self, path, base=None, index=None, create=False):
        ''' Add a new path to the list of search paths. Return False if it does
            not exist.

            :param path: The new search path. Relative paths are turned into an
                absolute and normalized form. If the path looks like a file (not
                ending in `/`), the filename is stripped off.
            :param base: Path used to absolutize relative search paths.
                Defaults to `:attr:base` which defaults to ``./``.
            :param index: Position within the list of search paths. Defaults to
                last index (appends to the list).
            :param create: Create non-existent search paths. Off by default.

            The `base` parameter makes it easy to reference files installed
            along with a python module or package::
            
                res.add_path('./resources/', __file__)
        '''
        base = os.path.abspath(os.path.dirname(base or self.base))
        path = os.path.abspath(os.path.join(base, os.path.dirname(path)))
        path += os.sep
        if path in self.path:
            self.path.remove(path)
        if create and not os.path.isdir(path):
            os.mkdirs(path)
        if index is None:
            self.path.append(path)
        else:
            self.path.insert(index, path)
        self.cache.clear()