A notoriously heavy and bottom-heavy vehicle at that. I would not want to be caught upside down in one of those, knowing that there is a tonne or so of batteries trying to crush me.
1. You wouldn't be caught upside down in it. Tesla was unable to flip the Model X in testing [1] (I assume the Model S is even harder to flip). The advantages of having an extremely low center of gravity due to the battery pack (coming in at 1323 lbs).
2. Reinforced pillars. Their strength is such that they damaged the device used to test roof failures [2] (I believe the force the roof was subjected to was equivalent to 5 Model S' atop the test vehicle). I'm confident that in the extremely unlikely event the vehicle was upside down, you would walk away from the vehicle, roof intact.