title: ssh2-sftp-client get() request giving 'denied permission - error'
body: <p>I am using this code in my electron app to connect to an sftp server where I need to collect some data. I have no problem listing the files in the /out folder, but it fails to get the sftp file with 'deined permission' error. Ideally I would like to be able get() file and access the text data within directly in the function without storing to a file. </p>
  
  <pre><code>let Client = require('ssh2-sftp-client');
  let sftp = new Client();
  
  var root = '/out';
  var today = new Date();
  var mon = ((today.getMonth()+1) &lt; 10)? "0" + (today.getMonth()+1) : (today.getMonth()+1);
  var date = (today.getDate() &lt; 10)? "0" + today.getDate() : today.getDate();
  var fileDate = mon + date;   
  
  
  sftp.connect({
      host: '&lt;server-address&gt;',
      port: 2222,
      username: 'XXXXXXXX',
      password: 'xxxxxxxx',
      privateKey: fs.readFileSync(path.join(__dirname, '../rsa/&lt;file-name-here&gt;.pem'))
  })
  .then(() =&gt; {
      return sftp.list(root, 'SN5M' + fileDate);
  })
  .then((fileInfo) =&gt; { 
      if (fileInfo) {
          var filePath = root + '/' + fileInfo[fileInfo.length - 1].name;
          return sftp.get(filePath).then((file) =&gt; {
              console.log(file);
              event.returnValue = file;
              sftp.end();
          })
          .catch((err) =&gt; {
              console.log('File get error', err);
              event.returnValue = err;
              sftp.end();
          });
      }
  })
  .catch((err) =&gt; {
      console.log('File info error', err);
      event.returnValue = err;
      sftp.end();
  });
  </code></pre>