Brandon fixes

fixing script so it runs on linux. Then it can be built and tested.