Fixes #65 with python 2/3 compatibility

Solves the:
TypeError: 'str' does not support the buffer interface
referenced in #65