mkpreview.sh: Use AWK better
Made scripts a bit more compatible