h_token: Copy string correctly.

See https://github.com/ffi/ffi/wiki/Core-Concepts#string-memory-allocation for additional information.
Add real tests.