fixing preinstall and test scripts