Python 3 doesn't have basestring nor long; use str and int instead

 Hello,

I just sent you and email because I couldn't push my branch. Now I finally could. This pull is based on your master. Please review it.

Thanks!