Documentation: use non-binary write mode for generating `templatebuiltins.js`

This would cause an exception in Python 3 when trying to `make html` the docs.
![](http://images4.fanpop.com/image/photos/16100000/Cute-Kitten-kittens-16123158-1280-800.jpg)