Use Path.addTrailingSlash instead of the other 4 alternatives