Integration tests. Fixes #12.

It would good to delete temporary directories here.