changes to system test script to get it to run in OSX/Ubuntu