consolidate hsm-internal scripts

with this patch there is only one script for all archiving modes:
hsm-internal.sh
The script gets a new parameter packMode that has to set to point to the
corresponding hsm-by-dir or hsm-by-group script that will be sourced by
the hsm-internal script and be used for performing the mode specific
tasks.