Write a stream into binary file.
filename (str) – filename for output file
iterator ([bytes]) – an iterator of bytes to write to file