Minor Python 3 fixes (syntax and str.decode)