Make it work with python 3.x

I got errors trying to run pythonwhois in python 3.x. I believe these changes will fix that.

I ran tests successfully in python 3.3 and 2.7.