Fix lockfile() to use the given "dir" argument
lockfile() was using SANLK_RUN_DIR for creating the run directory, and
the dir argument for building the lockfile path. Use only dir so we can
create a lockfile in another directory. This will be useful for running
sanlock as non-privileged user during the tests.
Signed-off-by: Nir Soffer <nsoffer@redhat.com>