Fix handling of the dir/file settings being passed in via postMessage. Fixes T3012.

Summary: We only pass in the file/dir settings on init of the code, however in future postMessages updates we were overwriting those properties with `undefined`. Oops!

Test Plan: Make a scratchpad with an image in it. Click the restart button - it should now work!

Reviewers: pamela

Reviewed By: pamela

Maniphest Tasks: T3012

Differential Revision: http://phabricator.khanacademy.org/D12319