Improved file filtering for copyDirSyncRecursive