Fix get_writable_path (#42895)
Summary:
As name suggests, this function should always return a writable path
Call `mkdtemp` to create temp folder if path is not writable
This fixes `TestNN.test_conv_backcompat` if PyTorch is installed in non-writable location
Fixes #{issue number}
Pull Request resolved: https://github.com/pytorch/pytorch/pull/42895
Reviewed By: dzhulgakov
Differential Revision: D23070320
Pulled By: malfet
fbshipit-source-id: ed6a681d46346696a0de7e71f0b21cba852a964e