Expands file patterns, returning the matched and unmatched files and directories.