Few changes to support running on python3

I know python3 is such an improvement that most people can write it without any bugs.  So a library for quick and dirty debugging could be seen as unnecessary.  Still, for those of us who confuse still manage to confuse bytes with str, a python3 version of these tools is not just a matter of completeness, it's a necessity!

The changes contained herein enable q to function on both python2 and python3.