Raise URI::InvalidURIError if wrong uri.

Until we implement our own parser, raise URI::InvalidURIError  when gid is incorrect
Let's go with `set_extracted_uri` and then set the @uri in that method. Then the two methods are at exactly the same level of abstraction.