Fixed tests. Improved unicode<->str conversion a bit.