Fix directory provided by TEMPLATE_DIR