Version 1.1 of the macro handles trailing punctuation marks:
Please note that you will have to enter the closing octothorp twice in your glossary:
ermöglichen\tmaken #mogelijk##
Tip: Add '\#' to the characters to remove in the Preferences, to use a keyboard shortcut to remove the hashes when no transmogrification is needed.
alwayslockyourbike
Here's the macro: