add "dump.js" script

i think this script cleanly supercedes the existing test.js script