fix test script on macos

This fixes test.sh on macos.