make build_handlebars_templates.py work with Python 2.6
Merge review 166 by @srh
Merge branch 'next' into sam_84