Retains proper permissions for given directories