Adapted to Amazon's move from JSON files from to some javascript stuff.

Thanks for publishing the script! This is very handy for billing projects.

I've updated the URLs to the new lazy-json locations in the python version and removes an unneeded header and footer from the 'lazy-JSON' content. Am feeding the results into demjson, as it was more tolerant in parsing of the lazy-json content.

Seems to work for all os types, ondemand and reserved instances.

Cheers