make sync gateway config upload more robust
make sync gateway config upload more robust

tleyden/elastic-thought,tleyden/elastic-thought,aaam/elastic-thought,aaam/elastic-thought,aaam/elastic-thought,tleyden/elastic-thought