Added dir scan method. But its needed to fix realloc.