Work nicely with urlFormats that end in '.html'

Creates directories with `index.html` when url format ends with a `/` and named html files if the format ends in `.html` (or any other extension)