Changes to make the tests run on Mac

Hello people,

  I had to made the following changes to be able to run the tests on Mac, basically the changes are below

- The check for the leap_tests folder cannot use the whole path (because tempfile.mkdtemp uses different paths on different systems)
- The gpg binary is not guaranteed to be on /usr/bin/gpg and the PATH is trimmed on the tests init, so we have to detect gpg for the tests to run

The tests run fine now on Mac and Linux here
this will raise an Attribute error if the gpg_path is None.
So I think you'd better check for None and return an empty string.
```python
return os.path.realpath(gpg_path) if gpg_path is not None else ""
```