Handles limiting running instances of a script