simplify home expansion in completion, fix issue on osx (fix #27)