Update for getopts changes

getopts now uses StrBuf instead of ~str.