Fixes relative path issue when checking for existence of template