less agressively fix fs.dirname() issue