move file.go into batch.go and batch_tree.go
basic tests for batchTree, with a few bugfixes