Fix opening utf8 urls on OSX

- Escape hostnames with punycode
- Use proper encoding when launching open