remove redundant common parent between two path