This has made the code a lot more performant with large directories.
After the above removal, the (mapcar #'shell-quote-argument) was
removed because it was causing issues with recursive operation - many
directories ended up being left out, and sxiv complained about not
being able to find them.
There was no need to remove the last element. It was added to remove a
blank string if the file ended with a blank line, but that blank
string was harmless.