print(): Switch from statement to funtion.
Fix octal literals.
Use io module instead of file.
Use int division `//` insted of float division `/`.
Make next methods available as __next__.
Use assertEqual rather than assertEquals as the latter is deprecated.
Use for loop instead of map when not iterating.

In PY3, map returns an opperator, so the funcion never gets called.
Correctly handle binascii.Error.