Added a toString method to the Path class.