smarter thread blocking. and ignores hidden files.

ignores hidden files. using NSCondition to block main thread instead of primitive while loop. fixes #29