Adjusted the script to receive the HOME var as input if needed. Needed this as the HOME var is wrongly set in puppet and the script was using it. More info at http://projects.puppetlabs.com/issues/5224