Updated build scripts to remove plugins, platfroms and merges before compiling