port tests to mocha

nodeunit wasnt able to handle throwing an error in a callback

Squashed commit of the following:

commit b276e4f6673202330ba028bc33b6f3b0ade5927c
Author: jeffrom <jeffmartin@gmail.com>
Date:   Thu Mar 27 16:46:58 2014 -0700

    whack old tests.js and tweak Makefile

commit 6e76124137a3c64c033d100056712e4b4aa40761
Author: jeffrom <jeffmartin@gmail.com>
Date:   Thu Mar 27 16:43:18 2014 -0700

    finish mocha port

commit 5fdf1924245138fe1dc11ec135d7cae6325374d8
Author: jeffrom <jeffmartin@gmail.com>
Date:   Thu Mar 27 16:09:11 2014 -0700

    checkpoint port of tests to mocha

    network connection is bad