more reliable directory test