Fix shell scripts for MacOS X

Make test and book doesn't work on Yosemite without installing GNU versions of grep, sed and findutils.
Modify shell scripts to be compatible with BSD-based distributions:
* grep extended regex syntax since Perl syntax no longer supported
* find requires explicit path
* sed requires explicit option after empty extension