(QENG-1225) Use `fail` instead of `puts msg; exit 1`

Signed-off-by: Wayne <wayne@puppetlabs.com>