hack around `S_IFDIR`