Better index filename handling in filesystem data source

This is a fix for #327.

This makes sure that:

* when allowing dots in identifiers, `"index.html.erb"` gets the identifier `"/index.html/"` instead of `"/"`;
* when either allowing or disallowing dots in identifiers, `"index"` gets the identifier `"/"` insteadof `"/index/"`.