Checks if dir exists before creating