Fix existing process check.

The existing code fails as it might return the grep process itself. This
change makes sure it ignore the grep process.