Use fork&exec for opening urls

This is an alternative solution to #273 (also mentioned there).
Also fixes #301.