replace Python 3.3 new exception by more general OSError