Code for problem "Simplify Path".