Fixes bug #4466

Fixes http://projects.theforeman.org/issues/4466

I don't know if these changes relate to the #FIXME. However, the elements from `os["XXX"]` don't contain `"XXX"`. Instead, there is `"name"` directly without the nesting.

This leads to all calls ending in the `rescue` statement and all the fields will be blank in the final output.