My proposed version for `feature/response-exception`

Here another proposal for `feature/response-exception`, which adds the following:

- Additional security by applying `basename()` to the template name
- Return relative paths in `getTemplateFile()`
- Remove the potentially insecure changes regarding a variable template path

I was going to drop the function anyways. Since it was limited to the core module, I doubt that anyone else used it.