server: check if root dir exists

Signed-off-by: Constantin MUSCĂ <constantin.musca@gmail.com>