A search for stellar X-ray sources in the Sagittarius and Carina dwarf galaxies I. X-ray observations