Fixed socket_test

It was performing an echo just before using $?, causing it to show all ports as
open.
Echoed the status prefix prior to performing the socket test to fix it.