executeCommandLine doesn’t give you a shell (sh, bash, csh, etc). It just executes the one command. Therefore operations provided by the shell like |, >, etc. are not available to you. Because of that, it’s literally telling ls to look for the file "-pt | grep -v / | tr '\''\n'\'' '\'','\'' | sed '\''s/,$//g'\''" which obviously doesn’t exist.
Your problem isn’t escaping, it’s that there’s not | operator.
You will either need to put this into a script that OH calls, or construct the command to pass this to a shell to execute.