Update example documentation to work with Python 3

* Use mode='rb' with open()
* Use `print(foo)` instead of `print foo`