Support UNIX ~ homedir expansion.

Patch from jolan, closes issue #17.