change write_midi_output to accept void* data
change output file mode from 666 to 664.
change type of mixer_options to unsigned short.
fix help output for testmidi option. reorganize main() a bit.