Fixed UnicodeEncodeError in task link generation.

The current task link generation (see PR #631) does not handle non-ascii character
correctly in all case. Which ends up in an UnicodeEncodeError.
Merge pull request #637 from 4teamwork/pg_task_link_fix_unicode

Fixed UnicodeEncodeError in task link generation.