Fix directory check in twrpDU

Change-Id: I3205cc965def20f2bc499a60769533b04b6ab93f