Checking if directory exists before trying to delete it.