Fixed WatchDir test making it less time dependent

Now use proper wait / notify logic. Test is probably less readable, but more robust. A failing test might take up to 5 seconds to fail (but we should not have failing tests, should we ?). The happy path is now as fast as possible.

Also fixed a buggy test on watching files (no idea why it was wrongly passing).
Merge pull request #168 from jmxtrans/update-maven-plugins-to-latest-versions

Fixed WatchDir test making it less time dependent