Add encoding kwarg for Python 3.

Closes #140.