Support local filepaths with robust url parsing