Re-create cgroups if necessary

If a task had cgroups, these should be restored. (Also any properties of
cgroups, but this commit doesn't do that yet.)

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
mkdir -p any dirs necessary for files

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>