Add better diagnostics to safe_open() error message.

This message is bizarrely triggered by a CPAN testers smoker, so I added some
better diagnostics to the error message to try to determine the cause.
safe_open() does some fairly rigorous testing, so it's concievalbe I'll have to
make allowances for this, which will be very annoying.

I do not want to introduce a security hole in safe_open() such as disregarding
failures because AUTOMATED_TESTING  is set, as this might, becaus environment
vars should not be trusted.

I also need to get rid of my use of given/when. I loved using them to save
typing when you compare multiple values in a nested if/then/else to one value.
It was a real time saver. Too bad smartmatching has down syndrome in Perl 5 :(
Because I really like using the cool 'eq' part of given/when. If only the
deprecation warning only triggered if you weren't just using it for eq. Oh well,
by by given/when. I guess I'll have to wait for Perl 6 to come out to start
using it :)