Check for nil before calling close
Merge branch 'fileleak' of https://github.com/hailocab/goamz into fileleak