Update build.sh with pull request changes

 - gradlew is already an executable
- make script POSIX compatible by using /bin/sh