function readFile(path) {
  return new Promise((resolve, reject) => {
    if (path === null) {
      let src = '';
      process.stdin.resume();
      process.stdin.on('data', buf => src += buf.toString());
      process.stdin.on('end', () => resolve({src, path: '-'}));
    } else {
      fs.readFile(path, 'utf8', (err, src) => err ? reject(err) : resolve({src, path}));
    }
  });
}
@param {?string} path
@return {!Promise<{src: string, path: string}>}