Make scipy.io.wavfile.write buffer-friendlier

This pullrequest aims to enable `scipy.io.wavfile.write()` to also accept buffers instead of just a filename.

Currently, only `scipy.io.wavfile.read()` supports a both filenames and buffers as the input file argument, after merging this PR, `write()` will be able to do the same.

I was able to test these changes with supplying both a filename and a buffer, and they worked fine. **But I haven't run any of the unittest** as I have yet to set up a proper testing environment.

So I would be grateful if anybody familiar with this matter could test the code.