Fix mkbootimg.c for Windows (MinGW) compatibility

* Using open()/read()/write() and friends is a bad idea on Windows
  due to the default being to treat them as text files.
Add boot.img unpacker