Added the dup flag for resent publish messages.

Closes #53.