Fixed locking bug
Now pids are recorded in lockfiles, so they can be checked later. If there is a lockfile, the pid is checked and if it is still running it prints an error and quits, otherwise it deletes the lock
is_running made static
is_running was changed to a static method for clarity reasons
Merge pull request #1 from mrobinson7627/master

Locking bugfix