(PUP-2766) Make newer environment tests run in PE env

Newer directory environment tests were relying on setting commandline
parameters for puppet to point to a temporary config directory.  This
doesn't work well for passenger or PE, so added some utility methods to
backup the established confdir files we are shadowing and ensure they
are replaced.  Also some changes to permissions related to Puppet
running with passenger dropping root permissions.