makefile: delete junk from bin on test
fix various off-by-one errors