Fixed bug in logging.py where messages were not being printed to stderr.

Also took the opportunity to port the print statments in logbook.py to
python3.

See issue #376 for more information.