added qualified paths for the working directories
update counters before moving result files
creating output files sorted by tag/sink id in directories
to facilitate their move with just a rename
fixed the output base name for partitioned files