Stop rewriting the index files in the pages array.

Instead of rewriting all the index files it uses their subdir name or in
case of the main index use base_url.
Merge pull request #4 from w-vi/master

Stop rewriting the index files in the pages array.