I recently read articles about perchlorate being found on Mars. Some are trying to figure out if the Phoenix lander's pyrotechnics are involved, but I found an interesting link about natural perchlorate formation on Earth that might explain the Martian source. This abstract
discusses perchlorate detected in the Black Rock Desert and in Death Valley, which apparently forms when titanium dioxide, salt and sunlight and/or UV light are combined. Seems to me that since Mars is a vast desert with apparently a fair amount of salt and no appreciable atmosphere to stop the UV, then this mechanism could easily be responsible.
By the way, I found this information by Googling "perchlorate formation" and the third link down was an article about natural perchlorate formation. Also I tried googling "desert perchlorate" and came up with the photo of the gents sampling perchlorate
in a hole in the desert. Go check it out.