Added docstring for check_dir_exists() function.