To set the correct default browser on OSX, go to System preferences | General | Default web browser.
If the default browser is correct but Terminal is still not behaving correctly, then change the default browser, and change it back again.
TIOA-TIOA FTW
(source)
A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.