Check for pid existence in graceful shutdown func

Check for the existence of the given pid before trying to
perform commands on it during graceful shutdowns.

Resolve bug https://bugzilla.redhat.com/show_bug.cgi?id=1081020