Fixing the script to work with puppet 3.3.1