[all modules] fix for the case when the output dir doesn't exist.
Fixed handling of the optional input files.
[common.py] added checks for the 'cut_threshold' parameter.