fix error message packets. We now assume they're ascii

bug + py3k compatibility. Also, db.py is growing very large. Maybe the
table configuration should be branched off to somewhere…