Script fixes for OSX
A few minor fixes and additions