Improve bin/createBaseModules, only npm install when necessary.

Also refactor the code, more functional and separated.
0.1.5