peek: add regression tests
bin: fix build on BSD, whoops!