leastCostPath function

Find the least cost path in a least cost matrix.