D 17348 uri stripper

Fixes the bug I found in the URI stripper, and rewrote the tests to be spock-y so that they're easier to read and understand.