More unit tests for NPOIFS writing, and correct a bug in how bats get allocated in xbats. (Some issues still remain)