Fixed the use of bytes and strings to be Python3 compatible.

Nice project, I have been wanting to do something similar myself. Thanks!

This fixes some issues I had with Python3.