fix is_mounted (memory leaks and NULL access)

Ensure that the return of realpath is checked for NULL before
access.  Ensure that the return value is free'd before it falls
out of scope.  Related tidying up.
missig header
modern gettext && added missing X11 dependency
Merge remote-tracking branch 'rawmind/master'
Now auto-unmounting on exit