io: More consistently popDir on failure.