Fixing bugs and refactoring flow.

Error opening files due to max limit set in osx. Change the way workers
are told that everything is done. Change the way we check if file is
valid.
Fix max open bug. Go back to wait group syncing.