#9 convert attrib templates

Adds templates
Convert the factor code to Ohai plugin.
Can't this be called from another ohai fact or does that not work here? Same for the line above this too.