DDF-532: Added checks for cases when the keystores do not exist.
Also updated test to verify that checks properly function.