The main problem is the user interface: the user can enter anything to identify the file. Returning to the data, she expected to see exactly the same line into which she typed.
The best way to handle this information is to save the actual entry to another location and use the mapping to get the actual file.
You can simply use the dictionary stored in the plist file. The dictionary will contain user input as a key and a UUID value. The file is then saved using the UUID as the file name. Thus, you are sure that the file name is always valid, and the user can enter whatever he wants, without fear for invalid file names.
, , , , , "/" "//" , .