[FLINK-1307] Allow input from nested directory structure

Hmm, I find it indeed a bit confusing that the length is added in the other branch of the if statement.
Maybe add a comment for that?