Add tests for custom keystore, and fix Selendroid handling