Various fixes mostly for mkimage-arch.sh.