-fixed misc bugs in build system impls
-improved build unit test
-added settings.lock(), and updated unittests to use this. Now unittests have
ability to completely control settings for each test.