TXTRecord fixes

I noticed a few necessary fixes to get TXTRecords working with Python 3.

Thanks for the port!