Several tweaks + cleanup to make this ready for mass testing.

* Got rid of console.* calls.
* Passing back errors into callbacks.
* Extracted diffing functionality into its own function for
  use in a testreduce client script.