fixes to build system and added a checkout script