check directory exists