make sure tmp directory is created with correct permissions