Remove trailing separator from path