Adds check for NULL path in cgroup module

This hardens the code although no such problem has been observed
proctrack/cgroup - change from retry to locks

In the event of a race condition on cgroup create/delete calls
in separate job steps, replace retry logic with a lock. This is
an enhancement of the retry logic recently added to version 2.6,
but the more complex logic (here) is only being added to v13.12.