Chapter Headings and Separate Documents

Have a look at the solution posted in this thread. That in particular will take the additional step of post-processing the .md files into LaTeX files. So if all you want is the .md files, you would edit the script to remove the post-processing parts. It should be fairly straight-forward, but let me know if you run into any issues.