22005 update preflight to delete old lib dir if it's set

In order to install in the top-level site_ruby directory, we need to clean out
any installs in the old site_ruby/1.8 location. We're doing this by setting a
variable in the package:apple task. If it's set, we remove all files there as
well as files in the new location.

While I'm here:
* update erb to strip leading and trailing spaces
* validate critical variables so a script is never generated with dangerous paths (to alleviate 21760)
* only target top-level files/dirs in lib, since we're doing rm -RF anyway
Merge branch '22005-install-to-top-level-site_ruby' of https://github.com/ccaviness/puppet into 22005-install-to-top-level-site_ruby
what is this