Look at `dir`:

```ruby
def dir
  File.dirname(url)
end
```
Apparently, if `url` has a leading slash, so does `File.dirname(url)`. It could be removed in this method though, but I'm not sure if that would be always consistent with previous behaviour either.