Finds a path from one point to another on a grid.