Fix error when "puppetmaster" is undefined
Also fixes warnings due to missing "@" before the variable names
Merge pull request #3 from theasci/master

Fix variable access warnings and an error