added a lot of special case handling.

added a lot of special case handling and some try/except for weird
cases where the pk3 file is lacking information.

apparently html can't display .tga in <img> so I need to add image
magick bindings to convert from tag to jpg/png