Added --head option (which, if true, assumes --output is the top-level ES...

... root, and appropriately appends each element's index onto the URL)