get_child_directories: don't check for null after dereferencing it

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