Fix check_template_paths for relative pathnames