Add logging to file

Sends log and/or debug output to file, also adds log.file( message,
fileprefix) method to log.js (Eg so can log trades to file)