Fixes bug RT-78272: Arbitrary code execution from $ENV

https://rt.cpan.org/Public/Bug/Display.html?id=78272

Just copied UNIVERSAL::require's solution to the same problem.
I didn't just use it as to not add any non-test dependency.

I've used Test::Exception on the tests, I hope it is ok.
Please, do let me know if I did something which is not acceptable and I'd be more than happy to provide another patch.