expand ~ in paths