Use $! instead of pgrep to get PID

related: LOGSTASH-1806

Using $! as it works much better for getting the PID, especially if the executable path contains special characters.