fix for imvalid filenames in bad name extension generator