filter out directories from the list of templates