Added a 5-minute timeout to autosaves.

Fixes issue 568.