Log panics to JSON error log.

First pass at this.  Writing to a hardcoded logfile in /tmp for now.