don't reset build/ if we're not using --hardcore, and some other fixes
make sure show-config works with npm (fix #1630)
separates checkApiLevel functionality and cleans up little bits