[WIP] Test into

Changed one function around. Wasnt working before, fixed it, added chunksize argument. Not sure if we want this to be a pattern, where we add chunksize arguments for functions which use chunks.

Also the code looks ugly and can probably be done better. 
also add a `try:` `finally:` suite around the whole thing, with the `os.remove(...)` in the finally clause, to make sure that the file is always deleted. something like this:

```python
try:
    ...
finally:
    try:
        os.remove('foo.h5')
    except OSError:  # an exception occurred before `foo.h5` was created
        pass
```