General fixes for CSV support
Cleaned up directory and fixed log dir checking