A ruby method to check if a PID exists.