fixed #1733, the python script perfectly works, tested on both osx and windows

This pull request fixed:
- Handling the difference of line ending between osx and windows
- remove os.popen("rm -rf" + …) usage which can not cross desktop platforms, uses shutil.rmtree instead
Merge pull request #2009 from walzer/project-creator

fixed #1733, the python script perfectly works, tested on both osx and windows