'Build a mako template filename lookup for the plugin.'

def _build_template_lookup(self, template_cache_dir, additional_template_paths=None, collection_size=DEFAULT_TEMPLATE_COLLECTION_SIZE, output_encoding=DEFAULT_TEMPLATE_ENCODING):

    template_lookup_paths = self.template_path
    if additional_template_paths:
        template_lookup_paths = ([template_lookup_paths] + additional_template_paths)
    return mako.lookup.TemplateLookup(directories=template_lookup_paths, module_directory=template_cache_dir, collection_size=collection_size, output_encoding=output_encoding)
