various fixes to deploy-doc.sh

various fixes to deploy-doc.sh, including NOT converting the link

`https://github.com/SitePen/dstore/blob/master/README.md`

into

`https://github.com/SitePen/dstore/blob/master/README.html`

Also made it more resilient to directories already existing.