make build_handlebars_templates.py work with Python 2.6
Merge review 166 by @srh