Avoid duplicates in sitemap

Do not include index files in the sitemap when stripping URLs. Do not include folders in the sitemap when not stripping URLs.

Resolves issue #836.