Fix issue with remote connection hung w/ SSL transport

There was a test (but misplaced!) on an exception potentially thrown by
the python SSL library. Python 3.4 and 3.2 have different behaviours, so
both are checked!