Use global variable

One of the variables in a function exported to GNU Parallel was not
itself exported.  Pathing woes ensued.

Signed-off-by: Alex Nelson <a.nelson@prometheuscomputing.com>
Escape ampersands too
Slightly modularize error counting