Use unicodecsv to replace csv

Use unicodecsv in python 2.x and csv in python 3 to support non-ascii directory names.