eliminate BSD grep discrepancies

Mac OS X users no longer depend on GNU `grep` for the script to work.