Port to Python3 with backward compatibility

Hi Manoj,

I have made changes to the original code so that it works with both Python3 and Python2. I also licensed the repo under __GPL v3__.