Fix pandoc tests

We should rather use a `is_binary` guard clause.