'write binary data into path.   If ensure is True create
missing parent directories.'

def write_binary(self, data, ensure=False):

    if ensure:
        self.dirpath().ensure(dir=1)
    with self.open('wb') as f:
        f.write(data)
