coreos: Small fixes in cache.sh
coreos: Small fixes in cache.sh

Variables in functions should be marked as local. Also looks like the
form "local var=foo" should not be used, because of a strange order of
processing this line - first var is marked as global variable and a
value is assigned to it, then the variable is made local.

Also, make it run with "set -e", so it will bail out if downloading or
verification failed.

coreos/rkt,blixtra/rkt,dgonyeo/rkt,il9ue/rkt,squeed/rkt,alban/rkt,s-urbaniak/rkt,jasonchaffee/rkt,kinvolk/rkt,nhlfr/rkt,nhlfr/rkt,adfernandes/rkt,liugenping/rkt,Wilybald/rkt,jonboulle/rkt,jakon89/rkt,markllama/rkt,matthaias/rkt,blixtra/rkt,Wilybald/rkt,sstabellini/rkt,intelsdi-x/rkt,Wilybald/rkt,adfernandes/rkt,dgonyeo/rkt,liugenping/rkt,shobhit85/rkt,alban/rkt,shobhit85/rkt,cab105/rkt,achanda/rkt,matthaias/rkt,matthaias/rkt,jakon89/rkt,rkt/rkt,achanda/rkt,jakon89/rkt,mike1729/rkt,rkt/rkt,jzelinskie/rkt,linki/rkt,cab105/rkt,joshix/rkt,endocode/rkt,rkt/rkt,il9ue/rkt,lucasallan/rkt,alban/rkt,yifan-gu/rkt,euank/rkt,Shashwatsh/rkt,Shashwatsh/rkt,ybubnov/rkt,yifan-gu/rkt,liugenping/rkt,jasonchaffee/rkt,monstermunchkin/rkt,joshix/rkt,akshaykarle/rkt,euank/rkt,kbrwn/rkt,ybubnov/rkt,euank/rkt,intelsdi-x/rkt,jjlakis/rkt,linki/rkt,jonboulle/rkt,Shashwatsh/rkt,blixtra/rkt,yifan-gu/rocket,lucasallan/rkt,sinfomicien/rkt,markllama/rkt,kbrwn/rkt,tmrts/rkt,markllama/rkt,endocode/rkt,sstabellini/rkt,sgotti/rkt,mike1729/rkt,yifan-gu/rocket,squeed/rkt,achanda/rkt,ybubnov/rkt,coreos/rkt,joshix/rkt,lucasallan/rkt,cab105/rkt,akshaykarle/rkt,jjlakis/rkt,squeed/rkt,linki/rkt,adfernandes/rkt,yifan-gu/rkt,lucasallan/rkt,jzelinskie/rkt,krnowak/rkt,tmrts/rkt,krnowak/rkt,sinfomicien/rkt,joshix/rkt,rkt/rkt,jjlakis/rkt,monstermunchkin/rkt,yifan-gu/rocket,kinvolk/rkt,intelsdi-x/rkt,jasonchaffee/rkt,kinvolk/rkt,sgotti/rkt,tmrts/rkt,mike1729/rkt,jzelinskie/rkt,akshaykarle/rkt,sstabellini/rkt,endocode/rkt,Wilybald/rkt,sgotti/rkt,sinfomicien/rkt,krnowak/rkt,nhlfr/rkt,kbrwn/rkt,coreos/rkt,il9ue/rkt,shobhit85/rkt,dgonyeo/rkt,monstermunchkin/rkt,jonboulle/rkt,kinvolk/rkt,s-urbaniak/rkt,s-urbaniak/rkt