Added getopt support, changed a default, fixed a bug.

I have added support for setting host and port with --host and --port
via the commandline.

I also changed the default to use 8 bit wav output ratherthan 16. This
uncovered a bug in the RIFF/WAVE header code which has been fixed.