Avoid flagging pages as "modified"

I moved the internals of `writeToStage` in here, in order to be able to use `writeWithoutVersion`.
Merge pull request #171 from JorisDebonnet/patch-1

Avoid flagging pages as "modified"