Stop rewriting the index files in the pages array.

Because I'm using slightly changed pico editor I've noticed that this plugin overwrites the pages array with a new one but unfortunately the index files are all lost but one. This fixes it and instead of rewriting the index files it uses their subdir name or in case of the main index uses base_url. 

I'm not sure if this is really an issue for anybody else but if so, they can find a fix here. I'll be happy if this pull request will be merged so I don't need to keep my own version. 

Cheers. 
vilda