fixed possible problem with realpath and false value

realpath(false) = current working directory.
This can cause problems with getAlias() which returns false.

see yiisoft/yii#3113