sed fixes for compatibility with FreeBSD.

The sed version on PC-BSD 9.1 complains about the following:
- 'c' command is not followed by backslash => use single multi-line sed expression, add backslash and message on a new line
- Doesn't understand the -- argument separator => drop it.
- Doesn't understand \| branches in basic REs => use extended REs with -E and adapt the RE.
Adapt self-test to FreeBSD.

The uniq version on PC-BSD 9.1 right-aligns the -c duplicate count to 3 display cells instead of 6; as this is more visually appealing; make this the default and fix for other systems with an appended sed substitution.
Self-test: Use the current script from the repository.
Housekeeping: git-ignore test output files.
Adapt readlink emulation coding style and use only when necessary.
Document 1.23 release.