Remove BASHisms to increase portability
Merge pull request #240 from MarkDBlackwell/feature_megatest2

Remove Bashisms & increase portability