Bug with gmt batch?

I run the 2nd example of gmt batch (the one of the european countries) and I get this error. In the past it works fine. I think it is a bug but I am not sure.

Error message:

batch [ERROR]: Must specify a single main script file

Full script

cat << EOF > pre.sh
gmt begin
    gmt coast -E=EU+l > countries.txt
gmt end
EOF
cat << EOF > main2.sh
gmt begin \${BATCH_NAME} pdf
    gmt coast -R\${BATCH_WORD0}+r2 -JQ10c -Glightgray -Slightblue -B -B+t"\${BATCH_WORD1}" -E\${BATCH_WORD0}+gred+p0.5p
    echo \${BATCH_WORD0} | gmt text -F+f16p+jTL+cTL -Gwhite -W1p
gmt end
EO
cat << EOF > post.sh
gs -dQUIET -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=\${BATCH_PREFIX}.pdf -dBATCH \${BATCH_PREFIX}_*.pdf
rm -f \${BATCH_PREFIX}_*.pdf
EOF
gmt batch main2.sh -Sbpre.sh -Sfpost.sh -Tcountries.txt+w"\t" -Ncountries -Vi -W -Zs

For the record. Just fixed in main.