fix size_t formatting, various off-by-one, and left binary message handling.
update tests file with sleep between valgrind executions and append to valgrind log.