Fix getLastHop() to return null when hops.size() == 0
  rather than throwing an exception.
Remove unnecessary call to getLastHop() in extend().
Merge pull request #1 from twilsonb/fix-getLastHop

Fix getLastHop() to return null when hops.size() == 0