Determining file format in print_figure

A problem was reported on the users list that saving to a file named
'blah.pdf' using the wxagg backend actually saves a jpeg file named
'blah.pdf.jpg'. I think I can see how to fix this (by adding a block to
FigureCanvasWx.print_figure() similar to the existing blocks for ps and
svg), but would prefer to leave it to someone who actually works with
wx, in case I accidentally break something and never notice. I'll file a
bug on sourceforge.

Overall, the system for determining file format looks like it has
evolved and not been designed: various backends have their own code to
look at the file name extension and then switch to the proper backend.
Wouldn't it make sense to share at least the code that determines the
backend from the extension?


Jouni K. Sepp�nen