Use tempfile module in g2p

This is really a small PR.

- use the `tempfile` module instead of a hardcoded temporary file in the main jasper directory.
- use `with` statement instead of `f = open(...) ... f.close()`
There needs to be a `f.flush()`, too. And I'm still not sure if this would work on Windows (Mandatory file locking).
Let's do this anyway.