deal with trailing ? case on file path uris