small fix about permissions when removing the temporary directory