scripts: mkimage-atv

fixes to make this script work .. ping me on irc if you want to debate anything