fix pwd null error.
Merge pull request #7 from windyGex/master

fix pwd null error.