Fix unicode support in Python 3

Summary:
The CSV module behaves slightly differently in Python 2 and 3. In Python 2, a
csv.reader expects to receive an ASCII-encoded string. Python 3, on the other
hand, expects a decoded (unicode) string. To deal with the inconsistency, we
add preprocess and postprocess functions that transform the incoming and out-
going data appropirately.
1.3.3