Some tweaks to the test script, and adding a plotting script (#389)