Fixed sending of data to socket

The stream had extra quotes on FreeBSD, so called printf directly.

Also removed unnecessary `tr` call that should have been removed in previous commit