the check_keypair function is called synchronized to ensure a key is not uploaded twice by multiple threads. fixes #79