Changed result for empty and nonexistent directory