Failure diagnostics

Adds a new `DIAGNOSTICS_DIR` variable for the relative path to diagnostic information.  (Default: local Diagnostics directory.)  Also stores, in that location, a screenshot, the browser logs, and the DOM at time of failure.