All that regex does it remove a "/" if there's one before the cmd, cos the socket doesnt need a "/" before the cmd