Fix typos in anchor links spec.
Correctly handle unicode in anchors.

URL-encode all unicode characters.

Fixes #397