(2.2) dcache-core (statistics): fix yet another potential NPE in tree cr...

...eation

If the user runs the admin command create html <yyyy> or create html <yyyy> <mm> and those directories do not exist, an NPE is thrown when the list of subfiles is sorted, since the list ends up being a NULL array.

It costs little to ensure the presence of those directories in each of the three methods, so dir.mkdirs() has been added there.

Testing:

Running commands in absence of the statistics directory tree now avoids the NPE and creates the necessary empty directories.

Target: 2.2
Patch: http://rb.dcache.org/r/6341/
Require-book: no
Require-notes: yes
Acked-by: Tigran
Committed: 020025653d1533f28e33ef9ac13d61fa6e4e45f8

RELEASE NOTES:

Fixes potential Null Pointer Exception thrown when create html <yyyy> or create html <yyyy> <mm> is run and those directories do not yet exist.