CookbookUpload needs to inherit from Knife as in chef proper, otherwise you get " superclass mismatch for class CookbookUpload (TypeError)" depending on load order