Tidy up build with gitignore files. Correct build and clean scripts.