Read-all-entries update to directory.open

Updated directory.open to read all directory contents at start
rather than during iteration in order to avoid any file
problems during iteration such as unreadable files or dangling
symlinks, etc.

See https://github.com/imatix/gsl/issue/12
Merge pull request #14 from gyepisam/master

directory.open now reads all entries at start