Couple of fixes to bin and test scripts