Make build artifacts executable

Also refactor `build.sh` to loop over groups.