Use iterator().next() instead of Iterables.getOnlyElement()

Fixes #185.
Merge pull request #186 from palantir/fix-185

Use iterator().next() instead of Iterables.getOnlyElement()
Clean and update build output more intelligently

Fixes #183.