fix "configure --prefix=" and improve path/arg handling in configure