Properly deal with csv dialect detection. Make sure that we always work with the correct class when reloading from the database