basename can resolve from a uri responding to to_s, not just strings