refactor determining url of sitemap and add tests
Merge pull request #1 from fdemmer/issue_23829

refactor determining url of sitemap and add tests