new method sanitizeFilename() in Directory helper