Corrected some exception constructs to py3

Should hopefully resolve ticket #326

Some more corrections.

Corrected some print statements for py3.

Convert tabs to spaces.

Fixed tab, messed up indentation. Corrected.
Merge pull request #327 from sanjayankur31/326

Corrected some exception constructs in pcsim and nemo backends to work with py3