Fix sitemap generation when there are no pages yet

Thanks to javisto for the report.

Fixes #393.