Expand ~ to home directory in filepaths. Fixes #8.