Update to support python3

This updates the code to work with python 3, issue #36. Similar to PR #38, but for the latest code.

The handling of utf-8 strings and bytes (decoding/encoding) is definitely not ideal. This could be cleaned up, but I'd need to study the library a bit more. Help here would be nice.

Three assertions in the tests don't pass (summary, keywords, authors), but the functionality is correct. These are because the results are random and so assertions will sometimes pass or fail. I don't know why they aren't deterministic, they always pass on master. Maybe due to an update on the dependencies. Not sure how you'd like to test or handle these.

Have a review, and let me know if there's anything else to update.