Fix build issues

This fixes a few issues where files generated by the build system are being incorrectly tracked.