Does it need to handle a path whose last character is slash?