fixed puppet-apply script