Properly free string array when transferring multiple files
This code was likely copy-pasted from the single-file variant function above, where only freeing the first element of the array is correct, but then not updated to match how the new arrays are created in the new function.
Addresses #156 (closed)