Fixed off-by-one error in message output by test
Fix bug in tcp_server usage in test

According to the documentation, the prepare callback is supposed
to return the length of the listen queue.  We were implicitly returning
whatever TCP port was assigned.  Return 0 to get the default instead.
Fixed likely cause of many failures from cpantesters

This test assumed that it was valid to invoke perl simply as 'perl'.
As explained on the cpantesters wiki, there's no guarantee that the
correct perl is in PATH while the tests are being run.

Use $Config{perlpath} instead, as recommended.
Relax warnings test

We expect an "ssh exited" and/or "broken pipe" warning here, but
it's not guaranteed to get both of them (it depends when events
arrive in the event loop).

Additionally, for the "Broken pipe" warning, the provided string
depends on the OS and locale, so attempting to test it precisely
will fail on some platforms.

Therefore, loosen the test to simply check that 1 or 2 warnings
occurred.
Fixed usage of basename() without including File::Basename

File::Basename seemed to be implicitly imported on most platforms,
but this was causing an error with strawberry perl.
Prepare version 20140611