Add autodetect support for Puppet Open Source as well as Puppet Enterprise.

I saw this magic in the puppetdb module and figured it would be useful here.