Directory iteration code.
Starts a new thread, iterates thorught directory and updates
progress in progress bar. Does not do the actual scanning yet.
It will come in next commit.