Allows to connect to existing server (and does not delete working kernel json files)

I changed/fixed the behaviour for connecting to existing kernels (previously it didn't and always deleted all json-files). The solution is not very beautiful but in worst case replicates previous behaviour.

Tested on Linux.