Python 2.6 compatibility and supporting child hostgroups

Since Ansible only requires python 2.6, I've changed the script to be compatible with python2.6.

I also added support for child hostgroups. This means you can have child hostgroups with the same name, and still get the separate servers.

In my case: we use different hostgroups for different environments, but they have the same name. For example: company/ci/services/ruby/onesearch and company/qa/services/ruby/onesearch