Modernize to Python 2.7 for raising and catching exceptions

We now use 'raise E(msg)' and 'except E as err:' instead of the older
(in some cases *much* older) forms we used to use.

(I believe that this means netblock now requires Python 2.6+. So it
goes.)