Tempfile fix for issue-37

This fixes the tempfile race, but introduces a dependency on https://github.com/djberg96/file-temp