Brownian micro-engines and refrigerators in a spatially periodic temperature field: Heat flow and performances