check tools before using them, add FreeBSD support
another sendto fix