sm: use MAXPATHLEN when checking the path length

MAXPATHLEN may be longer than sizeof(sun.sun_path), so we will
need to add a check for that.
sm: convert relative to absolute path

Also, check if new path is larger than sun.sun_path can hold.
sm: create shared memory object and mmap it