ps_mem.py: fix exception syntax for python 3
ps_mem.py: fix exception syntax for python 3

* scripts/ps_mem.py: Adjust exception inspection to
be compatible with both python 2.4 and 3
Reported at https://github.com/pixelb/scripts/issues/3

pixelb/ps_mem,gdm/ps_mem,nubark/ps_mem,knoxxs/ps_mem,shekkbuilder/ps_mem,mitchty/ps_mem