patched runProgram for OSX