__fish_urlencode: rework to behave properly on BSD/OS X

Work on #68.
__fish_config_interactive: send CWD via escapes in Apple Terminal

Closes #68.