do not force the permalink to be a dir if it ends on .html

Fixes #798.

The rake tests seem to pass. Still, this modifies current behaviour and is slightly backwards incompatible. However, would you specify a permalink ending in ".html" if you wanted it to be a directory? (And if you used the specified permalink for linking, i.e. without the `index.html` part, it will still work.)