Fixed opening of Files

Removed explicit open mode, so that auto backup/auto restart is used also
for DUMPPROJECTIONS, DUMPDERIVATIVES and DUMPFORCES. Regtests has been added
with backup files.

I also removed some unnecessary c_str().