cgroup: fix exit() vs rmdir() race