fix bug where --safari wouldn't pre-launch
and add tests