adding dirname.js