The php version clears out the matching files each time it runs a build. I think that might be the correct way to do this.