fix crash if OSError was raised in bltn_cd()