Rewrite, finally working correctly (wasn't using TestManifest correctly)

Now outputs the result to a given path (as a JSON document).