Remove unnecessary path additions.