Fixed double-checking of directory existence.

Signed-off-by: Baki Goxhaj <banago@gmail.com>