Fixes file not getting removed

When you used the default maxCount of 1 the execution never reached the
point where we register a shutdown function so the lock file wasn't
removed when execution stopped.

Now we just create a file if it doesn't exist and later when
file_get_contents returns an empty string we set the count to 0 instead
so that when we add 1 we get a valid first count.