In-place masking for flat files? That can't possibly work. You can just create a masked copy of your original file and afterwards rename the masked copy to the original name, but performing in-place with flat files is technically (almost) impossible.
Inplace masking is not supported for flat file sources and for your queries on the importing flat file sources to TDM please follow the below steps.
1) Import the flat file to PWC designer client.
2) Then import to TDM via Import from PWC Repository option > Select the folder where you imported the flat file in Designer > select the file and then import.
I would suggest to upload FFs into a relational DB, mask there and export back to FFs.
PWC is terrible in parsing FFs, especially if they have special characters, Unicode or UTF-8, quoted values & etc. Sometimes, it might swallow an issue and make your data a mess.
Usually, I pre-process a file with a simple Python script to ensure there is nothing in there to make PWC struggle. It also reports any deviations from the pre-defined format.
just to add to Pavel's response on PWC parsing, Designer only parses 500 lines from FF, if the column values are at different size and in different formats your column definitions will be a mess and your output as well.
if the first 500 records of column A are at 20 character length and the next 500 records are at 40, PWC designer will parse the column A datatype as String with Length\precision as 20, you will have to manually change it or select default 256 for all columns.
The same applies to quoted values.