[Security] Added check for failed chmod on "keypairs" directory creation
This is to help detect issues where the directory is later found to be not locked down.