Allow $2 as well for directory/style, and also

use getopt before getopts, because otherwise, if you run `cmd arg -o opt` you
won't get the opt for some strange reason