Set the generate image file filter according to the file type selected.
Fix may crash on exporting to GPX. Caused by recent commit.

Need to reset reused variable before adding to the list.
(My) Offending commit was SHA1:b02cd3a307f3412077e853026e164e99d34c8476