Fix file format query param issue

Based on the surrounding code this *looks* like a bug, in that I think it will generate a url query fragment `&format=pngpng` rather than `&format=png`.
Merge pull request #12 from stig/patch-1

Fix file format query param issue