def directory_is_present(self, directory_path):
p = self.p(directory_path)<EOL>if not os.path.exists(p):<EOL><INDENT>return False<EOL><DEDENT>if not os.path.isdir(p):<EOL><INDENT>raise IOError("<STR_LIT>" % directory_path)<EOL><DEDENT>return True<EOL>
check if directory 'directory_path' is present, raise IOError if it's not a directory

:param directory_path: str, directory to check
:return: True if directory exists, False if directory does not exist