Detection of templates directory by BASE_DIR.