Cleaned up a few static analyser warnings.
Fix for OSX InterprocessLocks for users with a network-based home folder.