Just one quick gotcha. The OS may re-use you old PID so you read it out the file, see it is in use and think your script is running. A check of your $0 against the command line of the proc that may be an instance of your script could help. 'course if your script is likely to run under various names this is mostly not going to help.
Cheers,
Random.