isdir: clean up, since at least grep still uses it