Uses a lockfile.

To determine if a process is already running.
The lock is released when the main process dies, so it should fixes issues when relaunching gtorrent after a crash.