Fix up and modernise the build system.
Ignore some generated and copied-in files