precalculate combined size of available files

this patch introduces a smarter way to determine wheter to create a new
archive. It always checks whether there are enough files left to fill
the archive.
This patch also adds more detailed debug log messages concerning the
remaining number of files and bytes.