'if exists' takes a parameter which can be directory, directory/, directory/. directory\ or directory. for example, and should equate to true if the directory exists. The syntax directory\ is explicitly rejected by FindFirstFile and hence was not working - look for this specific case, and if found append a '.'.
Follow-up commit of bc9d68bcbee5c9d4f4582f766a4f552870385361