Support fts() in FTS_CWDFD mode. Also work around Savannah bug #18466 (with a perfor...