Generate legend images

Don't include the '/wmts' in the base URL in the server mode (it can also be '/static')
Merge pull request #150 from sbrunner/legend

Generate legend images