[JS] Fixed socket path determination.