It's random, but interesting that placing it outside is referred to as "logical punctuation".
In other words, both are correct - do what humours (or humors) you.
As long as I'm here defending the poor New Yorker from the barbarians . . . :
Gruber was talking about this recently. He's going for "logical," and he of all people writing today represents one piece of the future of journalism. (Note that I'm going for American traditional.) I say that because he's careful, he thinks about typography, and he doesn't even have to, since he so works for himself.
But I seem to remember back in the 70s when phototypesetting was obsolescing the dangling-lead-period reason, we decided that it just looked better inside the quotes. And I seem to remember the Chicago style manual also made an argument based on aesthetics. I don't know where my old copy is, or I would look it up.
It still trips me up every time when I see that orphaned dot hanging out there in empty space. Even if it is more logical to put it out there.