Add tests for trailing_slash behavior
Fix bug where trailing slash is added even trailing_slash=False