Fix problem with image links

Image links were still incorrect when the referencing markdown file was
not in the root of the package. Now the links are adjusted to take
account of this.