Updated DIR detection

Signed-off-by: Oleg Bulatov <oleg@bulatov.me>