Use socat, which closes the socket way earlier

Seems newer implementations of netcat don't close the socket
after an EOF and just hang there. I could add a -w1 but that
just seems stupid.

socat seems to work better.
Use variance instead of mean
Add regex configuration files