[TIMOB-14974] Updated copyDirRecursive() to support both arrays and regexes for ignore lists.