Something funky with ~ in bash