Generate a list of files / directories in a directory