Minor cleanups to scons files.
Minor cleanups to scons files.

* Proper check for error exits when creating libraries.

* Other cleanups

wfxiang08/Nuitka,kayhayen/Nuitka,kayhayen/Nuitka,wfxiang08/Nuitka,kayhayen/Nuitka,tempbottle/Nuitka,tempbottle/Nuitka,kayhayen/Nuitka,wfxiang08/Nuitka,wfxiang08/Nuitka,tempbottle/Nuitka,tempbottle/Nuitka