pnm.py: Do not check for file existence before trying to open it
pnm.py: Do not check for file existence before trying to open it

Use the recommended "with open(filename)" syntax instead. Also switch
from IOError to RuntimeError when a file exists but is not valid.

toaarnio/imgio