log to stderr and work around a python regression

http://bugs.python.org/issue13601