Fix for https://issues.infn.it/jira/browse/VOMS-529

Currently, APIs are overly strict in requiring 400 permissions on the
key file.

Details:
Extended functionality of checkPrivateKeyPermissions accepting as
argument a list of posix file permissions.
Added related unit test.
Probably it's safer to have this private and specific to the private key checks, i.e. moving the logic in this method in checkPrivateKeyPermissions and just check for PRIVATE_KEY_PERMS. You can then drop all the sanity checks on the incoming permissionSet and have a static final string representation of the required permissions to report when permissions check fail (instead of building it every time the method is called).