Capture exception thrown by os.path.dirname
Capture exception thrown by os.path.dirname

Given None as an argument, it throws an AttributeError in Python 2,
but a TypeError in Python 3.

csdms/dakota,csdms/dakota