Added function to auto rotate images with rotation information inside exif data. This behavior can be switched on or off using the AUTO_ROTATE config flag.