extract.c: file_name_valid(): fix bad memdup