Build fixes

- Make in-tree build work again.
- Clean up .gitignore files a little.
- Remove more files on `make clean`.