adds logic to ignore permalink structures for files named "index". Also adds related tests.