Add a python binding to get the cost of a path