rpearce: Allow the use of facts[] and trusted[] as per Puppet 3.5+

For more information on $facts and $trusted see https://docs.puppetlabs.com/puppet/latest/reference/lang_facts_and_builtin_vars.html

Hopefully this meets with your approval, if not please let me know how this can be done and I will revise it :)

Thanks
-Richard