Add signal handler around fs put.

This will prevent ctrl+c corrupting local files.