encoder: free csv file name

Since strdup is used uniformly for filenames, csvfn cannot be const.