Preprocessor interface and documentation for endogenous_prior option

Closes #321
Add preprocessor messages (stdout, stderr) to the logfile

Closes #306