Update `tap --repair` function to ignore non-directory files in Library/Taps/

Closes #17518.
Closes #17511.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>