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

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

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