Add some missing error handling to markdown.c and hoedown.c

This should fix the issues discussed in #48.