Added missing getLength method for paths