Tweaks to reading of header (use try instead of of).  Changes to use of chmod for permissions in read_image (important for DSLRs).