More Py2.4-compatible try..finally/except blocks

Needed for SLC5 compatibility. Python <= 2.4 does not support except and
finally in the same block, they must be split into two try blocks.

See https://docs.python.org/2/whatsnew/2.5.html#pep-341