Rewrote mkbootimg and unpackbootimg in Python