Support ~ in paths

Closes #32.