Ensure contents is cached in the session when using Filesystem::write.