fixed grep for Mac compatibility.

Grep on Mac computers doesn’t have a -P option that we require in some
cases on Linux machines. The grep command appears to work the same way
without the -P on the mac.