Fix a scope issue when looking up the config hash

Without this fix, the configuration file is being overwritten on some Puppet
agent version (tested on 2.7.11). Using scope.lookupvar() is IMO clearer as
well.

Fixes #56