Fix string conversion correspondence

This caused leveldb tests to fail due to the approach to hashing the
string rather than the Direction there.