Python 3 compatibility

It's mostly pretty easy - all these scripts now run under Py3, although they do fail with ImportErrors.