PVRTC bugfixes, and fileformat auto-detection