lib/io.js
function validateDirectorySync(path, errorMessage) {
  errorMessage = errorMessage || 'Error validateDirectorySync() the directory path is not valid ' + path;
  var isValid = existsDirectorySync(path);
  if (!isValid) {
    console.error(errorMessage);
  }
  return isValid;
}
function validateDirectorySync(path, errorMessage) {
  errorMessage = errorMessage || 'Error validateDirectorySync() the directory path is not valid ' + path;
  var isValid = existsDirectorySync(path);
  if (!isValid) {
    console.error(errorMessage);
  }
  return isValid;
}
Validate if a given path has a valid directory, is it doesn't console.error with an optional custom message.
@param path
@param errorMessage
@returns {Boolean}