Unref the picure mapped file only after it has been copied.

Fix crash when exporting to Picasa.

(cherry picked from commit 98c2035d0dd3eaba4534af31135c70b9ff226bb4)