clean up `getopts` to hopefully make -l work for dash