Use a temp directory, not a temp file (oops)

I'm mostly testing this with Anvil, which allows me to see whether the
buildpack works without checking it in, but the only way to test against
the real system is to push my changes to GitHub.