Improvements and feedback from code review

Better handling of old versions of Puppet and other error conditions,
among other things.