Fix bug related to using the same tempfile for input and output.
Merge pull request #24 from localmed/tempfilebug

Fix bug related to using the same tempfile for input and output.
use file.base - closes #20
Don't push partials - fixes #25
0.4.0