Re-open source file on ValueError in ImageSpec.generate()
Merge pull request #204 from danxshap/close_file_fix

Re-open source file on ValueError in ImageSpec.generate()