Added a script to (re-)generate all test outputs.
Fix trailing whitespace removal on OS X.