Encode URI segments

Previously special characters in branch names and repository paths weren't
being encoded before creating the URL to open.

Closes #25