Remove redundant path component