Normalise whitespace in template files

Fixes #103.