Add basic tests and fix issue with generating DSA keys.