added empty object to errorJSON() call to catch when no error is present

When using the json reporter (`-R json`), the `errorJSON()` function quietly dies if there is no `test.err` property.  Feeding it an empty object allows it to succeed.

This also addresses #1314.