puppetmaster: Change the handling of the environment path

Instead of recursing through the whole environmentpath
to enforce permissions, set restrictions on the top-level
directory and suid/sgid it. This should be far more efficient
and versatile.