[FLINK-1307] Allow input from nested directory structure

`length += dir.getLen()` missing?