Moved __dirname reference to using process.cwd() for the correct directory origin.