parseURI function

Parse a URI string into its elements