job.c (create_batch_file): Fix last change: always increment the counter of batch files before trying to use it.