Use multiple temporary files for storing state

If one sets up multiple threads to watch projects on the same server, then each thread will share a state file. That's no good, so instead setup a separate state file for each instance. Also, throw them into a temporary dir for good measure.