Fixes empty header issue.

This will add a header only if the markdown did not provide a main
header for the chapter and there is a title for the chapter provided in
the yaml shim.