Fixed segfaulting on empty directories in Linux.