fix tests and remove use of netcat