Merge pull request #420 from cmr/master

Bunch of fixes
Simplify compressed texture handling

It seems like this should work from my readings of the
man pages.