fixes #6
Merge pull request #7 from audy/use-tempfiles

fixes #6