This also disables the security rubocop since we can trust files on disk enough.
Testing the methods inside of the function is a complete pain. This moves the code out to use the PuppetX pattern and adds some basic unit tests that validate the logic.