a function to dedup PATH