fix some typos in shell scripts that stopped them correctly evaluating the regex directory filter and processing the result code.