core.c: Support --script-file arg

Also had to change arguments validation; the new --script-file arg
was being warned as invalid since the error flag was set because the
--script arg function returned an error.