Added tests for failed ns_connect(). Fixed #13