provide safe version of directory-files

this should fix #14