Added Python2 Support

Needed to use this library in a project with python2, so added some code to make that happen.
Seems to be working fine, with some test files.

(Is there a reason why python2 isn't supported?)

Signed-off-by: Arvind Chembarpu <achembarpu@gmail.com>