use 'mode' for permissions to match fs.Stats better