TemplateFile: Fix loading of template, add test case

Specify encoding utf8 when loading a template, so we get a string
back, not a raw buffer, which Mustache can not use. Add test case
for rendering of templates.