Check for agent pid existence

Prior to checking process status, make sure the pid file exists.