Added TEMPLATE_DIRS directive.