Replace home directory with ~ in cwd.