Puppet 3.0 support and general fixes

Your very useful `catalog_config_version` fact doesn't play nice with Puppet 3.0+ due to variable interpolation issues (see related Foreman issue [#1872](http://projects.theforeman.org/issues/1872)), so I've attached their fix along with some other general fixes to make it behave better inside Facter if something goes wrong.