longestWord: improve punctuation handling