Minor performance changes

- Faster lookup in ``Client()`` within ``client.py``.
- Avoiding unnecessary temporary string creation in ``get_path()`` within ``election.py``.
- Avoiding unnecessary ``if()`` in ``set()`` within ``lock.py``.