Implement optional trailing slash in URL paths