Open the version file in a context manager.

This commit causes the VERSION file to be opened in a context manager,
ensuring it's closed again.