But don't remove trailing / if this is the whole path.