Ignore JSON output
Handle output filenames more elegantly
Handle HTML Tidy better

Only invoke HTML Tidy if rendering HTML as an object fails. First try
to use the PHP extension and, if that doesn't exist, then run it at the
command line. Closes #1.