Moved TagLibPermalink script here, branched from JatsTagLibrary