Add support for expanding directory which is start by ~/