Fix realloc bug in get_directory_contents

after a nih_realloc we do have to assign the previous pointer to the
new value, obviously.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>