Fixed schema and resource path related bugs with switching to NSURL.