I had always heard that you should keep the period tucked inside the punctuation. It’s a holdover from the days of hand-assembled typesetting in which individual letters are assembled into lines of text. It was so that the period didn’t fall over. Not really true.
In the advent of desktop publishing for everyone, we sometimes get confused or were never taught the right way. Here is a tip to keep us all straight that I learned from the book Your Mac/PC is Not a Typewriter:
Sentence punctuation goes after the closing parentheses if what is inside the parentheses is part of the sentence (as this phrase here). That goes for commas, colons, and semi-colons also.
If what is inside the parentheses is an entire statement of its own, the ending punctuation should be inside also.
(Get it?) :)