@lukecov Are you using Python 2 or 3? There is an important difference with the input function between the two versions.
In Python 2, there are two functions for reading user input, called input and raw_input. The raw_input function gives back the text typed by the user, as you would expect. The input function executes the user input as Python code (similar to how the >>> prompt works) and returns the result. Most likely you are using Python 2, which means the input function tries to run your filename as Python code. Because it's a single word, it looks like a variable name, and Python complains that the name isn't defined.
In Python 2, you should never, ever use the input function. Not only is it confusing to users (the user can't tell if input or raw_input is used), but it is also a security problem. The user can type any Python code in there, for example code that deletes everything in Pythonista's Documents folder. You're just asking for a file name, so raw_input is the function to use here.
Because of how bad and useless the Python 2 input function is, it was removed in Python 3. Instead, Python 2's raw_input was renamed to input in Python 3 (and there is no raw_input in Python 3). This means that under Python 3 input is the correct way to ask for text from the user.
If you're unsure what Python version your program is running on, you can add this code at the top to print out the Python version info:
import sys
print(sys.version)
To answer your other question - no, there is no need to import argv in the script posted by @TutorialDoctor. I'm guessing they forgot to remove the import after modifying your original code. Of course you can also change your code to take the filename from sys.argv, but in Pythonista this not as useful as on a normal system, because Pythonista has no shell. By default Pythonista passes no arguments when running a program, but if you want, you can long-press the run button to pass sys.argv arguments to your program.