Fix bug from expand_tilde

6 jobs for autocomplete
Status Name Job ID Coverage
  Test
canceled debian_stretch_x86_64_deb #27721
debian stretch x86_64

canceled osx_10.11_x86_64_dmg #27723
osx v10.11 dmg

canceled osx_10.8_x86_64_dmg #27724
osx v10.8 dmg

canceled raspbian_stretch_armv7l_deb #27726
raspbian arm stretch

canceled ubuntu_16.04_x86_64_deb #27722
ubuntu v16.04 x86_64

canceled windows_i386_innosetup #27725
windows i386