fix depreciation warning in latest puppet versions

starting from the latest puppet update, a depreciation warning is shown with the Puppet::Util::SUIDManager.run_and_capture function.

This patch fixes it and keeps backwards compatibility.

It also keeps the tests working.