(bug 58892) Fixing NameError in pagefromfile.py

The error can be easily fixed copying the core code.
It's one of my old mistakes, It returned NameError because I used an undefined variable.

Change-Id: Ic685582d92f4df3339212b52a86550913c7a2b55
Merge "(bug 58892) Fixing NameError in pagefromfile.py"