The code looks fine. I tried to debug it, but apparently the download site is down since yesterday: http://host.robots.ox.ac.uk/pascal/VOC/voc2012/ 16
CC @fmassa: did they move the dataset or is the site just down at the moment?