fix if path has cwd in it, then cwd is not needed