Fixed detection of encrypted cookbooks.

The old detection code did not seem to work in Chef 10.18.2 so I added a check for the class as well.