wav writer byte-swap

For issue #25: wav writer: byte-swap the incoming buffer on big endian systems so that we write only little-endian 16 bit data.  Please review && merge as required.