Make scripts work on OSX