fix tab problem and change __dirname to process.cwd()

fix tab problem and change __dirname to process.cwd()