If you use the `.sub!` implementation below, this can become just 
```ruby
add_trailing_slash(path, options) if options[:trailing_slash]
``` 

With no need to reassign `path =`