Made python scripts compatible with python 3

Ditto title, scripts will still work with python2.7+ (probably 2.6+ but I don't have 2.6 installed so I could not test)
We may need to update fml python scripts too though