properly detect already running instances
Merge pull request #67 from wleese/master

properly detect already running instances