Merge pull request #4 from tmc/master

Fail more gracefully when you can't connect
Pass t to testConnectionWrapper to allow earlier failure
Thread errors and avoid panic()ing