fixed typo, adjusted file handling

`open` is preferred over `file`:
http://docs.python.org/2/library/functions.html#file
moved existence check for efficiency and readability
fixed PEP8 compliance

plus minor stylistic adjustments
adjusted error message

the full path should be pretty much meaningless to end-users, thus only
providing the file name
Merge pull request #19 from FND/master

twstatic: minor adjustments