Use errno for testing error type

Original test code is failed on non-English platform.

If user uses Japanese locale, he gets '接続を拒否されました'.
This message is not matched against '/conn/'.
Merge pull request #3 from syohex/fix_for_locale

Use errno for testing error type