setup: fix "inside work tree" detection on case-insensitive filesystems