Checking for directory.