Core: Added the ability to create a debug log of all of the output that is usually sent to stdout. Also relevant merlin.cfg and .gitignore entries.

Signed-off-by: Martin Stone <martin@d7415.co.uk>