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()`