Fix cpp_ext build dir create permission (#34239)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/34238
Pull Request resolved: https://github.com/pytorch/pytorch/pull/34239
Differential Revision: D21328036
Pulled By: soumith
fbshipit-source-id: dac2735383b1a689139af5a23f61ccbebd1fd6c1