remove path ended with a slash from PATH