fixes #4699 - support Puppet environments API for directory envs

First use of Puppet's API...

* https://github.com/puppetlabs/puppet/blob/master/api/docs/http_api_index.md
* https://github.com/puppetlabs/puppet/blob/master/api/docs/http_environments.md
It's already used in the Chef request tests, and is in bundler.d/test.rb.