Add test/index.js file that runs the tests. Fix broken tests.

These commits let you run `node test/index.js` and get a nice test report. I wasn't able to divine what test framework was originally being used, so I improvised by using the builtin 'assert' module plus a bit of async trickery. Some tests were broken (notably, the `Diff` tests, which were referencing a module that was renamed `FileDiff`); these commits include changes to get them passing again. Works together with `feature/npmpackage` to enable the `npm test` command for this package.