[ts.parse] logging and write out guessed manifest

now we call LOG.debug and LOG.warn in a few more places where recording
stuff like that might be interesting. WARNING: setting a handler to
DEBUG level is now likely to produce quite a lot of guff. Perhaps use
INFO unless you really are debugging.

Also, we now try (and silently fail) to write a JSON representation of
the manifest to disk, so we don't end up re-guessing it. Not that that
would hurt.