title: path must be a string or buffer
body: <p>I'm now learning NodeJS from nodeschool.io and the third exercise is about I/O file.</p>
  
  <p>It's asking me to write a program using a single synchronous filesystem operation to read a file and print the number of newlines to the console (stdout). The full path to the file to read will be provided as the first command-line argument (i.e., process.argv[2]).</p>
  
  <p>The answer for this exercise is similar to mine so I really know where I got wrong. This is my solution:</p>
  
  <pre><code>var fs = require('fs');
  
  var contents = fs.readFileSync(process.argv[2]);
  var strs = contents.toString();
  var lines = strs.split('/n').length - 1;
  
  console.log(lines);
  </code></pre>
  
  <p>but i got an error:</p>
  
  <pre><code>TypeError: path must be a string or Buffer
      at Object.fs.openSync (fs.js:660:18)
      at Object.fs.readFileSync (fs.js:565:33)
      at Object.&lt;anonymous&gt; (D:\projects\dmt-node-study\first-io.js:3:19)
      at Module._compile (internal/modules/cjs/loader.js:654:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
      at Module.load (internal/modules/cjs/loader.js:566:32)
      at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
      at Function.Module._load (internal/modules/cjs/loader.js:498:3)
      at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
      at startup (internal/bootstrap/node.js:201:19)
  </code></pre>