Fix shell scripts for MacOS X

* grep extended regex syntax since Perl syntax no longer supported
* find requires explicit path
* sed requires explicit option after empty extension
Merge pull request #360 from vbuslov/macos-fix

Fix shell scripts for MacOS X