changed to use newly defined BadFormatException in the Path class