Fix trailing slashes in path.