added template_dir to Environment