Added python3 support and fixed Windows compatiblity.

I tested this on Windows 7 ultiamte 32bit.

Doesn't work on ubuntu 14. It seems to have something to do with new chages in 14.
Will this still work in Python 2?