fix option parsing for `cfg` option

This allows --cfg both before and after the positional argument.