check for directory existence