Fix an exception related to handling IPC connections.

See http://paste.the-compiler.org/view/77f58b69
Add workaround for hang on messages during QNAM init.

See http://www.riverbankcomputing.com/pipermail/pyqt/2014-November/035045.html