Luigi LocalTarget binary file : <p>I am having troubles to write a binary <code>LocalTarget</code> in a Luigi pipeline in my project. I isolated the problem here:</p>

<pre><code>class LuigiTest(luigi.Task):
    def output(self):
        return luigi.LocalTarget('test.npz')

    def run(self):
        with self.output().open('wb') as fout:
            np.savez_compressed(fout, array=np.asarray([1, 2, 3]))
</code></pre>

<p>I tried opening as <code>'w'</code> and <code>'wb'</code> but I keep getting the following error:</p>

<pre><code>TypeError: write() argument must be str, not bytes
</code></pre>

<p>I am using python 3.5.1 and my version of luigi is 2.1.1</p>
