Encode the path passed to json-schema as a URI

Json-schema expects a URI and fails if given a path with unencoded spaces.