HPCC-10498 Fix problems copying bundles with nested directories.

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Merge branch 'issue10498' into candidate-4.2.2

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>