(FOR REVIEW) (PUP-3521) Fix Puppet's exception swallowing

# FOR REVIEW

This PR attempts to fix Puppet's exception swallowing. It does this by changing places where Puppet rescues and swallows an exception to have a more granular `rescue` clause. 

This PR is going to need some review to ensure these changes are sane.
this seems unsafe, this won't catch errors in requiring curses which I assume is inside the block for a reason
you could add scripterror or possibly not change this one since it's vendored code