Misc Python 3 fixes in anticipation of working spidev