Fix miscellaneous compile errors, +x dist/dt

- chmod +x dist/dwarftherapist

- fix various clang, cppcheck warnings.