Using scientific-grade CCDs for the direct detection of dark matter with the DAMIC-M experiment