doctor: simplify trailing slash checks