seq_file: add function to write binary data