Get local cookbook version from Chef

It makes the code much simpler and finally fixes #5 (support loading `metadata.json` when no `metadata.rb` file exists)!