Fix connection.js for use in strict mode

When running node with `--use_strict` one gets this error:


    node_modules/ftp/lib/connection.js:650
      function nextDir() {
      ^^^^^^^^
    SyntaxError: In strict mode code, functions can only be declared at top level or immediately within another function.