swrap: Add missing NULL checks to socket_wrapper_dir()