Split printfs on newlines when logging to console

newlines are escaped in the terminal when logged by console.log
Fix syntax error
Fix console invocation error
Merge pull request #5 from xsleonard/patch-4

Log newline delimited statements separately