Revert "PythonTest_dbaccess_python: don't modify source document"

This reverts commit 29474c7a227050b16fc341bdf7df68112793a23d.

Removing the lock file fails on Windows because it is opened; it ought
be possible to close the document instead to clean up the lock file?

Change-Id: I2c93fc893c62d6a267be9723761e5ed7577086a7