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

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