Use Client vardir, not the puppet masters vardir

The function is meant to output the path on the client to the output file. If a client uses a different Puppet[:vardir] however, the code will fail by using the Puppet Masters Puppet[:vardir] - as expected of functions.

This change will use the stdlib puppet_vardir fact to retrieve the proper vardir value. In absence of the stdlib fact, it'll fall back to old behaviour.