Replace hardcoded './lib/' dir with __dirname