I've cleaned things up and rewritten it. Let me know if this works for you: http://git.zx2c4.com/cgit/commit/?h=jd/freebsd&id=5ea22a6b0f7821d9415a27791bacec617c66ec39 Remember to ``make clean'' before testing.