Fixed script for MacOS X.