Use :unicode.characters_to_binary/list() instead of the Kernel functions.

The Kernel functions can't handle arbitrary code points.