YARN-2734. Skipped sub-folders in the local log dir when aggregating logs. Contributed by Xuan Gong.

(cherry picked from commit caecd9fffe7c6216be31f3ab65349182045451fa)