Directory Indexes breaks when you have paths with spaces

My `index.html.erb`:
```
<ul>
  <li><%= link_to 'No spaces', 'foo_bar.html' %></li>
  <li><%= link_to 'Spaces, no escaping.', 'foo bar.html' %></li>
  <li><%= link_to 'Spaces, percent encoded.', 'foo%20bar.html' %></li>
</ul>
```

`foo_bar.html` and `foo bar.html` are in the same directory as `index.html.erb`.

Generated output with `activate :directory_indexes` in `config.rb`:
```
<ul>
  <li><a href="/foo_bar/">No spaces</a></li>
  <li><a href="foo bar.html">Spaces, no escaping.</a></li>
  <li><a href="foo%20bar.html">Spaces, percent encoded.</a></li>
</ul>
```

... and without `activate :directory_indexes`:
```
<ul>
  <li><a href="/foo_bar.html">No spaces</a></li>
  <li><a href="foo bar.html">Spaces, no escaping.</a></li>
  <li><a href="foo%20bar.html">Spaces, percent encoded.</a></li>
</ul>
```