Fixed alternating process lock
Fixed alternating process lock

The test to see if the db existed was leaving a process in the db
and stopping itself running, but not the next time it ran. Change existance
test and works consistently now.

sqlpadawan/dbatools,wsmelton/dbatools,dsolodow/dbatools,kozloski/dbatools,Splaxi/dbatools,SirCaptainMitch/dbatools,alevyinroc/dbatools