Also, be sure to set all output parameters as output in the parameters under the "Direction" field below the parameter list.
The Data Types can be a bother to get straight, but tweaking these may solve errors generated by running your tool with parameters.
I almost wonder if it isn't easier to test any scripts without parameters and then go back to add them in.
So back to the original question:
you could have a user specify a text file (text files are an option in the parameters tab, so I assume that it works)
userinputtextfile = arcpy.GetParameterAsText(0)
output = open('gnis.csv', "a")
for line in userinputtextfile
line=line.replace("|", ",")
output.write(line)
output.close()
That should fix your input issue, however the output will be slightly different, something slightly different, like:
userinputtextfile = arcpy.GetParameterAsText(0)
outputcsv = arcpy.GetParameterAsText(1)
output = open(outputcsv, "a")
for line in userinputtextfile
line=line.replace("|", ",")
output.write(line)
output.close()
I likely violated some python language parameter, but you get the idea. Also, I think the suggestions I made might be specific to Arc 10.x, so please take both factors into consideration when editing your code.