log error message when cleaning up cache fails during startup
if getuid() != 0, then our u/gid will be getu/gid() the whole time
chmod/chown envs dir when preparing this

This will ensure we have the necesary rights or fail.
be more careful when cleaning up envs directory

I'm not sure if this could be actually (ab)used, but the original code,
if it failed to remove a symlink to a directory for some reason, could then
descend into this directory and start removing stuff there.
cleanup envs dir still with root privileges

Otherwise upgrade from older versions which kept some files
there owned by root:root may not work :(.
mkdir -p