Variable scope changes.

* Using local variables.
* Changing the lock_exists variable name to exists, since the function's
* name is lock_exists().
Merge branch 'master' of https://github.com/ATNI/keyway