Fixes for tests scripts on OSX.