Fixed null pointers in sprintf of root directory listing