implementing output not just to standard out but also component files when in testing mode

what’s happening here:

I want to make changes so, instead of just sending output to
“standard out”, the output is sent also to a series of files
which, combined, roughly match the output sent to “standard
out”. One approach would be to simply replace all calls to
"printf()" with calls to a wrapper function which attempts to
produce the "double output" if such is expected. When the
'--test' option is passed to the application, this expectation
can be presumed for all output. The second file to which output
goes can default to standard output and if, for whatever reason,
double output is expected but this second file is standard
output, an assertion failure can issue. Doing so should make for
rapid identification of points in the code to alter as far as
expectations and output files is concerned.

The format of the different file names shall be as follows:
	- Data related to psuedo-random number generator
	  initialization: “InitRand.<#>” where ‘<#>’ is the
	  unsigned integer used to seed the psuedo-random number
	  generator, called (“PRNG seed”)
	- The printing of various constants: “PrintConsts”
	- Computer generated Bayesian regret based election
	  results:
	  “<PRNGSeed>.<utilityGeneratorMethodNumber>.<ignoranceLevel>.<indexIntoTheHonLevelsArray>.<numberOfVotersInTheGivenElection>.BRDriver”
	- Summary for computer generated Bayesian regret based
	  election results:
	  “BRDriver.summary.<numberOfElectionScenariosCalculated>.<PRNGSeed>”
	- Calculated Bayesian regret based on “real world” data:
	  “<PRNGSeed>.<ignoranceLevel>.<indexIntoTheHonLevelsArray>.RWBRDriver”
	- Summary for “real world” Bayesian regret based
	  election results:
	  “RWBRDriver.summary.<numberOfElectionScenariosCalculated>.<PRNGSeed>”
	- Self testing data: “runSelfTests.<PRNGSeed>”
	- Information related to the Yee test: “YeeTestText.<PRNGSeed>”

Each file will be opened as close to the point of writing to it
as practical. After writing to each file completes, said file
shall be closed as soon as practical. While, I see no reason why
more than one file would need to be opened at any moment, in
case something has gone wrong, the fact only one file is open at
a time should be verified.

In order to ensure the PRNG seed is available, each function
using that value to create a file name should have that value
passed to it.

“Double output” should not occur during the creation of the Yee
pictures themselves nor during the loading of “real world”
election data files.