sitemap handler now trys to create the sitemap directories if they dont already exist
now can optionally send tempalte strings - quite dangerous as uses eval but its there for fringe cases