rework dcraw.c to c++, fix for filelist segv