Fix TSO lock file check when running the script

Correctly check if TSO is already started by testing the PID file
presence.
Merge pull request #629 from enovance/fix-tso-lock

Fix TSO lock file check when running the script