Function for fetching templates
Gets a template config with the given name from the passed in directory