Change path::toString to be a const function

path::toString should be const