fix bugs in write_md.R to make it to be able to add images in gh-pages posts