Even a missed penalty and a red card could not stop Real Madrid from defeating Valencia and going top of La Liga.