scripts: mkimage-atv

fixes to make this script work .. ping me on irc if you want to debate
anything
Merge pull request #3019 from chewitt/fix_mkimage-atv

scripts: mkimage-atv