fixed ROOT_DIR and TEMPLATE_DIR definitions, os.path.join should take individual arguments rather than a list