Fix relative links in markdown. Related to #6182

Related to #6182

Also include simple fix for images

``` ruby
return "raw" if @repository.blob_at(current_ref, path).image?
```