check if the template exists and not just null. Fixes #39.
Merge branch 'master' of https://github.com/PhileCMS/Phile