Fixing config file open modes to also work on Windows