Minor improvements to shell scripts for local building