LocalSocket: take null-terminator of socket path into account
Fixes a valgrind warning. It happened to work on Linux probably due to the passed in length which also terminates the string.