Correctly extract templates from S3/objectstores
Correctly extract templates from S3/objectstores

Fixes issue with using templates stored in S3. Thanks to Bryan Downie.

chapmanb/bcbio-nextgen,gifford-lab/bcbio-nextgen,a113n/bcbio-nextgen,biocyberman/bcbio-nextgen,vladsaveliev/bcbio-nextgen,lbeltrame/bcbio-nextgen,brainstorm/bcbio-nextgen,a113n/bcbio-nextgen,lbeltrame/bcbio-nextgen,mjafin/bcbio-nextgen,biocyberman/bcbio-nextgen,vladsaveliev/bcbio-nextgen,chapmanb/bcbio-nextgen,brainstorm/bcbio-nextgen,brainstorm/bcbio-nextgen,mjafin/bcbio-nextgen,Cyberbio-Lab/bcbio-nextgen,lbeltrame/bcbio-nextgen,a113n/bcbio-nextgen,gifford-lab/bcbio-nextgen,biocyberman/bcbio-nextgen,Cyberbio-Lab/bcbio-nextgen,mjafin/bcbio-nextgen,vladsaveliev/bcbio-nextgen,chapmanb/bcbio-nextgen,gifford-lab/bcbio-nextgen,Cyberbio-Lab/bcbio-nextgen