fix home path when ENV home is not set

* Fix getting HOME when environment home is not set (~ will not expand )