Python3 compatibility

Hey,

I made some changes to the module so it can be used with python3 as well. This might be useful when used as a library in python3 packages. For example to convert `README.md` in `setup.py`.

Best regards