Fix grep errors on pre-commit (dev-scripts/pre-commit)

Under OS X grep does not have the -P (perl regexp), so these if statements were
not being executed and commiting was echoing grep errors.

Substituting it with the standard (at least OS X 10.9 and Ubuntu 13) --regexp
which uses a more basic regexp but that works just fine with this 3 regexps.

Tested with:
         git ls-files | grep --regexp '\.js$'
         git ls-files | grep --regexp '\.*php$'
         git ls-files | grep --regexp 'includes/skins/.*php$'

Change-Id: Ice2c2a2326b0d329a712e2ab79fd53e61a6f56bc