build.sh: Improve support for building for testing

Conflicts:
	build.sh