Probably more reasonable to type assert that this is os.PathError.