Minor fixes to test-generator bash scripts. This is in NO WAY finished and I need to think more thoroughly how I'm going to build this. TBC