re-wrote test to create output with document.createElement, much better output, print just failed tests and some statistics (more verbose output of correct tests can be turned on by uncommenting one line)