Small cleanup and a bugfix

- Fixed the bug, where resolutionlist was a global array.
  This caused the filewriter to write the same urls in every file.
  I should probably add the deeplink to the mission_images hash.

- Writing each file when we have all urls for a mission

- Also resetting the mechanize agent a bit earlier