Python 3 fixes

This lets mediacrush run on python 3, but not much has been tested.