Fix dirInfo check when dir does not exist

Regression related to FileInfo changes

Please review @icewind1991 @schiesbn