Move all PhysFS init/deinit stuff into static functions in File; update engine and test to use it.