shell: avoid path which starts by '~' (tilde).