I suffered from this problem when compiling for any board. For a long time, prior to re-building a sketch, I got into the habit of manually deleting the IDE session's temporary build folder that's located in the following folder:
users....\appdata\local\temp
This build folder is the one that's listed in the verbose output, saying that access is denied.
(This folder is deleted on exit from the IDE).
The problem with deleting this folder is that it increases the build time.
On some occasions, the manual delete would fail, indicating that McAfee had a file open in that folder.
Then the penny dropped, so now I temporarily turn off real-time scanning when using the Arduino IDE.
Save me loads of time when debugging, as the re-compiles are so much faster now.