pagefromfile.py: pep257 and optimisation

Close open hanging file.
Use bot.userPut() instead of page.save().
Used PageSaveRelatedError hierarchy.

Change-Id: Ic2da03cac8e3939549fa6bd074539213ee594907
Merge "pagefromfile.py: pep257 and optimisation"