IdrisDoc tests + bug fix

This is tests for IdrisDoc as promised earlier.
While writing them I found a bug related to merging documentations, which I fixed while at it.