Fixed scripts to run on OSX 10.8.