i dont think this has been said before, if it has, then sorry
all you need to know is the file's real file extention. and just replace the messed up one withe the right one. like when you download from http://qj.net , look at the file discription to see if it should be .zip, .rar, or other.
when saving pic with the psp, if the file moves it is a .gif. other then that, if it is not part of a sites layout it is probaly a .jpg
i hope this helps people