Improve Markdown support

I'm currently adding Markdown export to MindNode and with the current implementation of the markdown writer I get too many newlines.