'runClientWith' correctly closes socket in timeout case

Previously this function would leak socket handles if the call to
connect failed (i.e. timed out). It seems that sockets must be closed
whether they are successfully connected or not.
Merge pull request #54 from jystic/master

'runClientWith' correctly closes socket in timeout case