Fixed handling of index and readme permalinks