unpack_bootimg: write base and cmdline to file [+fixed operation on windows]