scripting.c: fix typos in argument number checks
Fixup
Add gnulib xalloc module, and replace chunkalloc with X[ZC]ALLOC