make use of atexit module to remove lock

if the GUI is started as normal user the and casper.conf can not
be read as it requires root the lock will not be removed, address
this by using registering at exit function