Handle preallocation correctly

git-svn-id: https://code.downthemall.net/repos/trunk@3682 43940e1f-b481-bb45-89eb-5c6a4bf3d40a
Work around OS.File seek bug

git-svn-id: https://code.downthemall.net/repos/trunk@3683 43940e1f-b481-bb45-89eb-5c6a4bf3d40a