Made the C++ code compile in release mode on OS X.
Relpaced build_handlebars_templates.sh with the more portable build_handlebars_templates.py.