Fix log output corrupting markdown

Use `console.error` rather than `console.log` so logs go to stderr
Merge pull request #3 from pdf/logs_to_stderr

Fix log output corrupting markdown