Update README and examples for build sys changes.

And make the shell script BSD friendly again.