If you live in the U.S., commas and periods go inside the quotation marks, always, every single time. Every other punctuation mark goes inside the quotes if it's part of the quoted material and outside if it's not. Commas and periods do not work that way. (In the U.S. They do in the U.K.) I know it doesn't make sense.