At the beginning of the tmw_config you have to define the path to wdir. This is very easy to see. I think the other paths (to mallet, to treetagger and so on) should be also define at the beginning of the script and not every time in the different steps.