Check additional dirs are writable in doctor

* Checks that HOMEBREW_PREFIX, HOMEBREW_PREFIX/include, and
  HOMEBREW_PREFIX/lib are all writable as part of doctor.