returning promise from markdown doc generation, fixes #22