have curl fail on 403, only overwrite the key if the exit code is 0
fix bash if statement
Merge pull request #1 from bnied/master

have curl fail on 403, only overwrite the key if the exit code is 0