More gracefully handle the socket used exception.

Fixes #80.

I can almost guarantee this will cause merge conflicts with #100. Once one of these gets merged I will fix the conflicts in the other.