Merge "Fix handling of directory entries"