Added arrays and counters to keep track of which files we need to put into
the tar