function haveConnection(client, name, reject) {
  if (!client.sftp) {
    const newError = new Error(`${name}: No SFTP connection available`);
    newError.code = errorCode.connect;
    if (reject) {
      reject(newError);
      return false;
    } else {
      throw newError;
    }
  }
  return true;
}
Check to see if there is an active sftp connection

@param {Object} client - current sftp object
@param {String} name - name given to this connection
@param {Function} reject - if defined, call this rather than throw
                           an error
@returns {Boolean} True if connection OK
@throws {Error}