Tesla Motors posts a second-quarter loss of $293.2 million