TOOLS: Make input files handling more robust

Some tools have a very generic input file format (e.g. *.*) but
reimplement inspectInput() to restrict the acceptable inputs.
However this was only used when working out which tool can
process a given input (when the tool is not specified). Now this
is also used when checking the inputs given to a specific tool.