Fix a crash when path argument was empty.