checkValidStructure fails when using yarn

The path extraction logic used before actually calling the
validation assumes a directory structure that has changed
between hadoop mr v1 and yarn. This commit fixes the problem
and lowers the odds of false positives.

Tests and finalizing fix