Add support for system.img.ext4, fix old method