Fixing bug with unicode templates

The utils.md5s() function would break when calculating checksums
for non-ascii characters. Convert to utf-8 first.