Added quick and fairly dirty animated gif support
Thumbnailng code more "resilient" to errors with specific images