fix checking for absolute path to template