base: allow creating tempfile in a custom temporary dir.

Bug: http://b/70232908
Test: none.
Change-Id: I24b894793f6725186b3582a91db083427e51aa5a
2 files changed