Fix fs.open error on non-existing directories