Allow correct validation of binary files

Now in filters, file.contents is a Buffer if the file is binary. It is
a string otherwise