Fix regression introduced in revision 1.15 by using strndup() instead of
strdup() to allocated directory list components.

ok jsing@