async function cleanupTestDirectories() {
  try {
    console.log('Cleaning up test directories...');
    await fs.rm(TEST_DIR, { recursive: true, force: true });
    await fs.rm(OUTSIDE_DIR, { recursive: true, force: true });
    
    // Clean up additional test directories
    await fs.rm(path.join(__dirname, 'test_dir_abc'), { recursive: true, force: true }).catch(() => {});
    await fs.rm(path.join(__dirname, 'test_dir_abc_xyz'), { recursive: true, force: true }).catch(() => {});
    
    console.log('Cleanup complete.');
  } catch (error) {
    // Ignore errors if directory doesn't exist
    if (error.code !== 'ENOENT') {
      console.error('Error during cleanup:', error);
    }
  }
}
Helper function to clean up test directories