Fix hanging tests on FreeBSD

Replacing Test::Trap with Capture::Tiny causes all tests to run and pass.