Unnecessary echos and pipes replaced by herestrings

I am reading "alien" code to improve my own coding style. I will
suggest improvements through a series of commits. I hope you'll find
some of them useful.
Write the same message to both stdout and stderr

You do not need to repeat the message, you can use the tee command to
write to stderr (do not repeat yourself: less lines of code, easier to
maintain).
Put repeated text in a variable

Use the content of the variable LIS with a herestring, simplify the
construction of the MEM variable, put the repeated path to the khmer
folfer in a variable.
Create OUTDIR if it does not already exist

Remove the test (which results where not used anyway) and replace it
with the mkdir option "-p".
Use the same coding style everywhere for loops

Now, conditionals (if ; then) and loops (for ; do) have the same
style. Also, correct the name of the KHMER variable