This should work for the special period character. If there are any other punctuation marks you need at the ends of words, add them as strings to the variable called "punct-right." Note: punctuation which goes to the left is handled differently. If you need additional characters, add them to the variable "punct-L" as characters--i.e. preceded by #\
If you need any multi-byte characters for punctuation which goes to the left, the function will need to be adapted. Easy enough to do--just let me know.