Strip "/index" part from page url for sitemap

I stripped "/index" part from URLs from pages which are subfolders (ex. `/sub/index`) and from main page (`index`) - I'd rather have `http://example.com/` and `http://example.com/sub` in sitemap than `http://example.com/index` and `http://example.com/sub/index`. I also fixed inconsistencies in whitespace in the plugin file.