added capability of using ~/ shortcut for path