netwatch: add OS X support (and a little test for debugging)

This pull-request depends on peerdrive/peerdrive#5.