Added some logic to enable uploading cookbooks

With this added code you can now post a cookbook to the community, or newly released supermarket, API. It does break backwards compatibility for post commands which with the current options seems the only way to make this work.

Please let's discus alternatives if this is not an acceptable approach. For example, one solution could be to make a PostCookbook method in addition to the Post method.

Cheers,

S.