Remove ')' at the end of the output string of collections, directories and files.