'Add a new directory to the template lookup path.'

def add_directory(self, directory, prepend=False):

    if prepend:
        self.directories.insert(0, os.path.normpath(directory))
    else:
        self.directories.append(os.path.normpath(directory))
    unique = hashlib.md5(':'.join((str(d) for d in self.directories))).hexdigest()
    self.template_args['module_directory'] = os.path.join(self.__original_module_directory, unique)
    self._collection.clear()
    self._uri_cache.clear()
