scripts/functions-{ba,z}sh: update/fix mktmp