Improve test-and-diff.sh