set dirname in require path for cli.spec.js