The bash script before used to determine the path of itself (this is the path with the test binaries). In the /bin/sh script the current path was used instead and the tests failed. Replaced with /bin/sh compatible code, to get the script directory.