Separated getopt parsing into options.h, currently only supported in serial_stream.c