…to set up to use getopt, so all these knobs are tuneable...
…m reading for all these knobs.
Changed periodic printing logic. Fixed calls to write_to_buffer() and read_from_buffer(); I'd forgotten to convert from bit counts to byte counts, and all fwrite() calls were failing because of it.
…utput bytes as will let it reach its threshhold before it sleeps. It also sleeps for shorter periods.