Added null check for keypairs
Merge pull request #26 from maksimov/2014.03

Added null check for keypairs
Fixing tests broken by new keypair handling
Merge pull request #28 from maksimov/2014.03

Fixing tests broken by new keypair handling