Fixed generation of the latest config
Fix for getting the inventory from inventories.yml! (Hopefully)

Also added heaps of debug messages from the bit that was causing me
problems