Catch top level socket I/O errors

Much like socket.timeout this is another base exception that urllib some
how passes through.
Revert decode error ignore removal, make compatible with pre-2.7

Looks like there are still issues with input sanitization. I suppose the
removal of the argument was premature.