Modifying temp files to use pid

Allows multiple instances to be run simulaneously