GPII-3999:  Addressing Tyler's review comment
GPII-3999:  Addressing Tyler's review comment

Added loop to check that 'pilot-agent' process was terminated.

mrtyler/gpii-infra,mrtyler/gpii-infra,mrtyler/gpii-infra,mrtyler/gpii-infra