Recognise file changes during the saving process

Fixes https://github.com/owncloud/apps/issues/1618