Python 3 support

Pretty simple to get working under Py 3.3, as it happens.